Skip to content

k6 interview questions — Hard

325 hard-level k6 questions from our Performance Testing bank, each with the correct answer and an explanation of why it is correct.

What this covers

k6 appears throughout Performance Testing interviews. At hard level, interviewers are typically checking depth under pressure — edge cases, failure modes, performance characteristics, and the trade-offs you accepted. Work through these, then explain your answer out loud; the second part is what interviews actually test.

4 example questions

  1. 1. Identify the INCORRECT statement about k6:

    • A. Setup() runs before every single iteration of every VU.correct
    • B. Setup() runs once before the test and teardown() once after, sharing data with VUs.
    • C. K6 scripts are written in JavaScript with a default exported function executed by each virtual user.
    • D. Environment variables are accessed in k6 via __ENV.

    Why: The selected statement is false. The other options are accurate statements about k6.

  2. 2. Regarding k6, which of the following is a false statement?

    • A. K6 is designed to run headlessly in CI/CD pipelines.
    • B. Setup() runs once before the test and teardown() once after, sharing data with VUs.
    • C. K6 scripts are written in JavaScript with a default exported function executed by each virtual user.
    • D. K6 can only run through a desktop GUI.correct

    Why: The selected statement is false. The other options are accurate statements about k6.

  3. 3. Which statement about k6 is NOT correct?

    • A. K6 scripts are written in JavaScript with a default exported function executed by each virtual user.
    • B. K6 supports no protocol other than HTTP/1.0.correct
    • C. Stages define ramping patterns, e.g., ramp to 100 VUs, hold, then ramp down.
    • D. Thresholds define pass/fail criteria like http_req_duration p(95)<500ms.

    Why: The selected statement is false. The other options are accurate statements about k6.

  4. 4. Which of the following statements about k6 is FALSE?

    • A. K6 supports HTTP/1.1, HTTP/2, WebSocket, and gRPC protocols.
    • B. K6 requires launching a full browser instance per virtual user for HTTP tests.correct
    • C. Stages define ramping patterns, e.g., ramp to 100 VUs, hold, then ramp down.
    • D. Setup() runs once before the test and teardown() once after, sharing data with VUs.

    Why: The selected statement is false. The other options are accurate statements about k6.

Related Performance Testing topics