Hey! I have a problem when declaring my scenarios, the thresholds are not being respected for some reason that I don’t know.
I have 2 scenarios, where the first one will send 1 VU with 1 request to my API, the second scenario will send 10 users to the other endpoint with different data.
The problem is the following, when running the 2 scenarios k6 displays unusual metrics, making the request take around 9 seconds, and if you also run the same test in Postman, the requests do not exceed 4 seconds each.
Below my options:
export const options = {
scenarios: {
requisicao_unica_1: {
executor: 'per-vu-iterations',
startTime: '0s',
vus: 1,
iterations: 1,
tags: { test_type: 'req1' }, // extra tags for the metrics generated by this scenario
exec: 'executarTeste', // the function this scenario will execute
},
requisicao_unica_10: {
executor: 'per-vu-iterations',
vus: 10,
iterations: 1,
tags: { test_type: 'req2' },
exec: 'executarTeste', // the function this scenario will execute
},
},
thresholds: {
// we can set different thresholds for the different scenarios because
// of the extra metric tags we set!
'http_req_duration{test_type:req1}': ['p(95)<4000'], // 95% das requisições devem ser concluídas em menos de 500ms
'http_req_duration{test_type:req2}': ['p(95)<5000'],
},
};
k6 version v0.45.0 (2023-06-19T08:41:01+0000/v0.45.0-0-gc3b4587b, go1.20.5, linux/amd64)