Load Testing · Middle · Question 18 of 76
Why set discardResponseBodies: true in a large k6 test?
- 1To hide personal data in responses from the k6 summary
- 2To make the server skip generating the bodies of responses
- 3To save generator memory when you don't need to read the bodies
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.