grafana / k6-cloud-feature-requests

The place to propose, dicuss and vote for k6 Cloud features and ideas.
9 stars 1 forks source link

Allow for expected errors on test steps - do not fail test #46

Closed leathej1 closed 2 years ago

leathej1 commented 2 years ago

There are many situations where an endpoint returns a client error by design - for example a call to an AWS IAM endpoint to check for an existing session, which returns a 401 if the user is not logged in.

We really need to allow a k6 cloud user to set what the pass/fail criteria are for a test, which might not include certain expected http return codes from certain endpoints.

leathej1 commented 2 years ago

Ah, OK - Nicole set me straight with https://k6.io/docs/javascript-api/k6-http/setresponsecallback-callback/