Quantcast
Channel: Grafana k6 - Grafana Labs Community Forums
Viewing all articles
Browse latest Browse all 335

How to use thresholds in a custom scenario?

$
0
0

I am attempting to make a scenario for a specific test based on the K6_ENV env variable. However, I am having issues with the thresholds. Any ideas, please, on how to use the thresholds in this manner?

  const options = {
    scenarios: {
  
      dev_scenario: {           
          executor: 'ramping-vus',
          startVUs: 0,         
          stages: [             
            { duration: '10s', target: 10 },
            { duration: '5s', target: 0 },
          ],        
          gracefulRampDown: '0s',        
          env: { K6_ENV: 'dev' },               
          tags: { runTag: 'createNewPatient' },
          thresholds: {
            // http_req_failed: ['rate<0.01'],          
            http_req_duration: [{
              threshold: 'p(99.5)<100',       
              //abortOnFail: true,       
              delayAbortEval: "5s",                 
            }],                              
        },
      },
                          
    },                                    
  }; 

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 335

Trending Articles