Hey!
Somehow I have started getting weird error which seems to be pointing to GO language in my performance scripts:
ERRO[0051] Exception raised in test "12 API Call". Failing the test and continuing.
GoError: context canceled at API is 200 (file:///Users/path/to/k6test/file.js:1:1(0)) source=console
My script looks like this:
describe('12 API Call', (t) => {
const response = http.get(Configuration.ApiName, data.data);
check(response, {
'API is 200': (r) => r.status === 200
});
t.expect(response.status).as('response status').toBeBetween(200, 299);
sleep(1);
});
Options that I am passing look like this:
loadTestNoAbort: {
scenarios: {
test_suite_one: {
executor: 'constant-vus',
vus: 10,
duration: '20s',
exec: 'testSuiteAll'
}
},
thresholds: {
http_req_duration: [
{
threshold: 'avg<2000', // if http req duration is avg over 2000, test aborts
abortOnFail: false // abort test if thresholds breached use true
// delayAbortEval: '5s' // delay of abort so data can be gathered in metrics
}
],
http_req_failed: [
{
threshold: 'rate<0.50', // During the whole test execution, the error rate must be lower than 1%.
abortOnFail: false // abort test if thresholds breached use true
// delayAbortEval: '5s' // delay of abort so data can be gathered in metrics
}
]
}
}