I am running a K6 tests with request.batch where number of requests can change for each test.
req = [req0, req1, req2, ...];
let res = http.batch(req);
then, I am trying to run a "check" for each request, and I use a while loop to do so.
while (i < req.length) {
check(
res[i],
{" ${i} - status 200": (r) => r.status === 200 }
);
i++;
}
however K6 accumulate all "check" tests results in a single test, as test message doesn't parse the variable I pass. the output prints this message at the end of the test:
done [===============] 10s / 10s
✓ ${i} - status 200
I have tried to use different ways add the parameters, but no use:
{ i + " - status 200": (r) => r.status === 200 }
{' ${i} - status 200': (r) => r.status === 200 }
{` ${i} - status 200`: (r) => r.status === 200 }
{" %d - status 200", i : (r) => r.status === 200 }
I would like to know if there is any why to pass a customized message here.