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. Which of the following best describes --out influxdb=... in k6?
- A. Flag streaming results to a time-series database.correct
- B. Read-only data structure shared across VUs efficiently.
- C. Organizes related requests for structured results.
- D. Option setting the number of concurrent virtual users.
Why: --out influxdb=...: Flag streaming results to a time-series database.
2. Which of the following best describes constant-arrival-rate in k6?
- A. Built-in metric measuring full request time.
- B. Total or per-VU count of scenario executions.
- C. Option setting the number of concurrent virtual users.
- D. Executor maintaining a fixed request rate regardless of response times.correct
Why: constant-arrival-rate: Executor maintaining a fixed request rate regardless of response times.
3. In the context of k6, --out influxdb=... is best described as:
- A. Total or per-VU count of scenario executions.
- B. Flag streaming results to a time-series database.correct
- C. Sends an HTTP GET request from the k6 http module.
- D. Built-in rate metric of failed requests.
Why: --out influxdb=...: Flag streaming results to a time-series database.
4. 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.
5. What is the purpose of constant-arrival-rate in k6?
- A. Option setting the number of concurrent virtual users.
- B. Built-in rate metric of failed requests.
- C. Executor maintaining a fixed request rate regardless of response times.correct
- D. Organizes related requests for structured results.
Why: constant-arrival-rate: Executor maintaining a fixed request rate regardless of response times.
6. Which of the following best describes exec.scenario in k6?
- A. Read-only data structure shared across VUs efficiently.
- B. Runtime information about the executing scenario.correct
- C. Option setting the number of concurrent virtual users.
- D. Built-in metric measuring full request time.
Why: exec.scenario: Runtime information about the executing scenario.
7. In k6, what does --out influxdb=... do or refer to?
- A. Option setting the number of concurrent virtual users.
- B. Organizes related requests for structured results.
- C. Flag streaming results to a time-series database.correct
- D. Executor maintaining a fixed request rate regardless of response times.
Why: --out influxdb=...: Flag streaming results to a time-series database.
8. In k6, what does http.get() do or refer to?
- A. Organizes related requests for structured results.
- B. Sends an HTTP GET request from the k6 http module.correct
- C. Read-only data structure shared across VUs efficiently.
- D. CLI command executing a test script.
Why: http.get(): Sends an HTTP GET request from the k6 http module.
9. What is the purpose of --out influxdb=... in k6?
- A. Total or per-VU count of scenario executions.
- B. Flag streaming results to a time-series database.correct
- C. Custom end-of-test report generation hook.
- D. Runtime information about the executing scenario.
Why: --out influxdb=...: Flag streaming results to a time-series database.
10. What is the purpose of http.get() in k6?
- A. Sends an HTTP GET request from the k6 http module.correct
- B. CLI command executing a test script.
- C. Total or per-VU count of scenario executions.
- D. Read-only data structure shared across VUs efficiently.
Why: http.get(): Sends an HTTP GET request from the k6 http module.
11. What is the purpose of http_req_duration in k6?
- A. Built-in metric measuring full request time.correct
- B. Built-in rate metric of failed requests.
- C. Sends an HTTP GET request from the k6 http module.
- D. Custom end-of-test report generation hook.
Why: http_req_duration: Built-in metric measuring full request time.
12. What is the purpose of SharedArray in k6?
- A. Custom end-of-test report generation hook.
- B. Total or per-VU count of scenario executions.
- C. Read-only data structure shared across VUs efficiently.correct
- D. Organizes related requests for structured results.
Why: SharedArray: Read-only data structure shared across VUs efficiently.
13. Which of the following best describes http.get() in k6?
- A. Executor maintaining a fixed request rate regardless of response times.
- B. Total or per-VU count of scenario executions.
- C. Organizes related requests for structured results.
- 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.
14. In k6, what does SharedArray do or refer to?
- A. CLI command executing a test script.
- B. Option setting the number of concurrent virtual users.
- C. Read-only data structure shared across VUs efficiently.correct
- D. Executor maintaining a fixed request rate regardless of response times.
Why: SharedArray: Read-only data structure shared across VUs efficiently.
15. Which of the following best describes SharedArray in k6?
- A. Option setting the number of concurrent virtual users.
- B. Custom end-of-test report generation hook.
- C. Read-only data structure shared across VUs efficiently.correct
- D. Sends an HTTP GET request from the k6 http module.
Why: SharedArray: Read-only data structure shared across VUs efficiently.
16. Which of the following best describes k6 run script.js in k6?
- A. Executor maintaining a fixed request rate regardless of response times.
- B. Built-in metric measuring full request time.
- C. Built-in rate metric of failed requests.
- D. CLI command executing a test script.correct
Why: k6 run script.js: CLI command executing a test script.
17. What is the purpose of exec.scenario in k6?
- A. Organizes related requests for structured results.
- B. Option setting the number of concurrent virtual users.
- C. Built-in rate metric of failed requests.
- D. Runtime information about the executing scenario.correct
Why: exec.scenario: Runtime information about the executing scenario.
18. In k6, what does constant-arrival-rate do or refer to?
- A. Sends an HTTP GET request from the k6 http module.
- B. Custom end-of-test report generation hook.
- C. Executor maintaining a fixed request rate regardless of response times.correct
- D. CLI command executing a test script.
Why: constant-arrival-rate: Executor maintaining a fixed request rate regardless of response times.
19. In k6, what does group() do or refer to?
- A. Built-in rate metric of failed requests.
- B. Organizes related requests for structured results.correct
- C. Total or per-VU count of scenario executions.
- D. CLI command executing a test script.
Why: group(): Organizes related requests for structured results.
20. Which of the following best describes http_req_failed in k6?
- A. Built-in rate metric of failed requests.correct
- B. Organizes related requests for structured results.
- C. Runtime information about the executing scenario.
- D. Custom end-of-test report generation hook.
Why: http_req_failed: Built-in rate metric of failed requests.