Load Testing · Middle · Question 18 of 76

Why set discardResponseBodies: true in a large k6 test?

Show the answer

Correct answer: To save generator memory when you don't need to read the bodies

Explanation

k6 still receives the bytes, but doesn't keep them. For requests that need the body, set responseType: 'text' on that request.

Further reading

Problem with a question

Load Testing · Middle · question 18

Test yourself

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

Take this quiz