Load Testing · Junior · Question 19 of 75

What does check() do in k6?

check(res, {
  'status is 200': (r) => r.status === 200,
});
Show the answer

Correct answer: Records whether a condition passed, without stopping the test

Explanation

Checks are like assertions that don't abort anything. k6 counts passes and failures and shows the pass rate in the summary.

Further reading

Problem with a question

Load Testing · Junior · question 19

Test yourself

Take the Load Testing · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz