Analyzing the failed request reported by K6

Hi Team,

I’m running some tests and the final stdout and the HTML reports say no threshold or check failures but show some failed requests.

The console logs didn’t see any warnings or errors or failures. Guide me on how to troubleshoot.

http_req_failed means that request returned 4XX or 5XX error. Check is used to confirm if the request returned correct status or body. Threshold is used for asserting that requests conformed to the limits you set for the API/Service. Without check or threshold, requests can still fail. You should use checks to run a counter to collect what type of error occurred and how many times it occurred.

Hi @aakash.gupta
Already check was performing required checks. Is there any way to pull the failed request from the influxdb or any other places.

can you explain a bit more.

Need to find out the failed request(s). Any logs or measurements I can get the required details.

you need to assign tags to the requests, the checks and the failed request counter. Using tags you can filter out the the failed ones.