Load Testing · Junior · Question 56 of 75

When does setup() run in k6?

Show the answer

Correct answer: Once, before the virtual users start

Explanation

setup() runs once and its return value is passed to the default function, e.g. an auth token. teardown() runs once at the end.

Further reading

Problem with a question

Load Testing · Junior · question 56

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