k6 interview questions — Easy

325 easy-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 easy level, interviewers are typically checking that you know the fundamentals and can describe them precisely — definitions, defaults, and the basic mechanics. Work through these, then explain your answer out loud; the second part is what interviews actually test.

20 example questions

  1. 1. In the context of k6, --out influxdb=... is best described as:

    • A. Flag streaming results to a time-series database.correct
    • B. Executor maintaining a fixed request rate regardless of response times.
    • C. Option setting the number of concurrent virtual users.
    • D. Read-only data structure shared across VUs efficiently.

    Why: --out influxdb=...: Flag streaming results to a time-series database.

  2. 2. Which of the following best describes --out influxdb=... in k6?

    • A. Flag streaming results to a time-series database.correct
    • B. Runtime information about the executing scenario.
    • C. Organizes related requests for structured results.
    • D. Read-only data structure shared across VUs efficiently.

    Why: --out influxdb=...: Flag streaming results to a time-series database.

  3. 3. Which of the following best describes http_req_duration in k6?

    • A. Built-in metric measuring full request time.correct
    • B. Sends an HTTP GET request from the k6 http module.
    • C. Total or per-VU count of scenario executions.
    • D. Read-only data structure shared across VUs efficiently.

    Why: http_req_duration: Built-in metric measuring full request time.

  4. 4. Which of the following best describes constant-arrival-rate in k6?

    • A. Option setting the number of concurrent virtual users.
    • B. Executor maintaining a fixed request rate regardless of response times.correct
    • C. Runtime information about the executing scenario.
    • D. Custom end-of-test report generation hook.

    Why: constant-arrival-rate: Executor maintaining a fixed request rate regardless of response times.

  5. 5. In k6, what does http_req_duration do or refer to?

    • A. CLI command executing a test script.
    • B. Built-in metric measuring full request time.correct
    • C. Option setting the number of concurrent virtual users.
    • D. Flag streaming results to a time-series database.

    Why: http_req_duration: Built-in metric measuring full request time.

  6. 6. What is the purpose of --out influxdb=... in k6?

    • A. Built-in metric measuring full request time.
    • B. Runtime information about the executing scenario.
    • C. Flag streaming results to a time-series database.correct
    • D. Option setting the number of concurrent virtual users.

    Why: --out influxdb=...: Flag streaming results to a time-series database.

  7. 7. What is the purpose of http_req_duration in k6?

    • A. Read-only data structure shared across VUs efficiently.
    • B. Built-in metric measuring full request time.correct
    • C. Organizes related requests for structured results.
    • D. Sends an HTTP GET request from the k6 http module.

    Why: http_req_duration: Built-in metric measuring full request time.

  8. 8. In k6, what does constant-arrival-rate do or refer to?

    • A. Executor maintaining a fixed request rate regardless of response times.correct
    • B. Sends an HTTP GET request from the k6 http module.
    • C. Read-only data structure shared across VUs efficiently.
    • D. Organizes related requests for structured results.

    Why: constant-arrival-rate: Executor maintaining a fixed request rate regardless of response times.

  9. 9. What is the purpose of SharedArray in k6?

    • A. Read-only data structure shared across VUs efficiently.correct
    • B. Built-in rate metric of failed requests.
    • C. Option setting the number of concurrent virtual users.
    • D. Executor maintaining a fixed request rate regardless of response times.

    Why: SharedArray: Read-only data structure shared across VUs efficiently.

  10. 10. Which of the following best describes http.get() in k6?

    • A. Executor maintaining a fixed request rate regardless of response times.
    • B. Sends an HTTP GET request from the k6 http module.correct
    • C. Custom end-of-test report generation hook.
    • D. Total or per-VU count of scenario executions.

    Why: http.get(): Sends an HTTP GET request from the k6 http module.

  11. 11. What is the purpose of constant-arrival-rate in k6?

    • A. Total or per-VU count of scenario executions.
    • B. Built-in rate metric of failed requests.
    • C. Executor maintaining a fixed request rate regardless of response times.correct
    • D. Flag streaming results to a time-series database.

    Why: constant-arrival-rate: Executor maintaining a fixed request rate regardless of response times.

  12. 12. Which of the following best describes exec.scenario in k6?

    • A. Option setting the number of concurrent virtual users.
    • B. Organizes related requests for structured results.
    • C. Custom end-of-test report generation hook.
    • D. Runtime information about the executing scenario.correct

    Why: exec.scenario: Runtime information about the executing scenario.

  13. 13. In k6, what does exec.scenario do or refer to?

    • A. Flag streaming results to a time-series database.
    • B. Runtime information about the executing scenario.correct
    • C. CLI command executing a test script.
    • D. Read-only data structure shared across VUs efficiently.

    Why: exec.scenario: Runtime information about the executing scenario.

  14. 14. Which of the following best describes SharedArray in k6?

    • A. Executor maintaining a fixed request rate regardless of response times.
    • B. Read-only data structure shared across VUs efficiently.correct
    • C. Option setting the number of concurrent virtual users.
    • D. Custom end-of-test report generation hook.

    Why: SharedArray: Read-only data structure shared across VUs efficiently.

  15. 15. What is the purpose of exec.scenario in k6?

    • A. Runtime information about the executing scenario.correct
    • B. Sends an HTTP GET request from the k6 http module.
    • C. CLI command executing a test script.
    • D. Organizes related requests for structured results.

    Why: exec.scenario: Runtime information about the executing scenario.

  16. 16. What is the purpose of http.get() in k6?

    • A. Executor maintaining a fixed request rate regardless of response times.
    • B. Sends an HTTP GET request from the k6 http module.correct
    • C. Organizes related requests for structured results.
    • D. CLI command executing a test script.

    Why: http.get(): Sends an HTTP GET request from the k6 http module.

  17. 17. In k6, what does http.get() do or refer to?

    • A. Runtime information about the executing scenario.
    • B. Organizes related requests for structured results.
    • C. Custom end-of-test report generation hook.
    • D. Sends an HTTP GET request from the k6 http module.correct

    Why: http.get(): Sends an HTTP GET request from the k6 http module.

  18. 18. In k6, what does --out influxdb=... do or refer to?

    • A. Custom end-of-test report generation hook.
    • B. Flag streaming results to a time-series database.correct
    • C. Built-in metric measuring full request time.
    • D. Runtime information about the executing scenario.

    Why: --out influxdb=...: Flag streaming results to a time-series database.

  19. 19. In k6, what does k6 run script.js do or refer to?

    • A. CLI command executing a test script.correct
    • B. Built-in metric measuring full request time.
    • C. Runtime information about the executing scenario.
    • D. Flag streaming results to a time-series database.

    Why: k6 run script.js: CLI command executing a test script.

  20. 20. Which of the following best describes iterations in k6?

    • A. Organizes related requests for structured results.
    • B. Total or per-VU count of scenario executions.correct
    • C. Sends an HTTP GET request from the k6 http module.
    • D. Option setting the number of concurrent virtual users.

    Why: iterations: Total or per-VU count of scenario executions.

Related Performance Testing topics