I'm new to k6 and I can't find a way to stop K6 from failing the CI environment when one of the thresholds fail.
I tried the below:
thresholds: {
'http_req_duration{type:firstQuery}': [
{ threshold: 'p(95)>500', abortOnFail: false },
],
'http_req_duration{type:secondQuery}': [
{ threshold: 'p(95)>500', abortOnFail: false },
],
},
This didn't work. I need a way to stop K6 default behavior of failing the CI environment when thresholds fail.
I believe, that this is not k6 failing your CI, but this is CI somehow fails if it get failing result from k6 test scripts. So if you want to disable this behaviour you should investigate your CI configuration, but not k6.
Also 'abortOnFail' flag just rules if k6 test script should abort/stop if threshold fail or should it continue (with failed threshold). And final test result will by failed if some threshold failed (aborted or continued test):
ERRO[0007] some thresholds have failed
You may have option to remove(or comment) thresholds from you k6 script,
or disable threshold checking with --no-thresholds
command-line option of k6 run command.
P.S. condition p(95)>500
seems strange, usually we check for that percentile is less than some value, not more.