Skip to main content

Explain how you would use k6 for performance testing.

  • k6
  • scripting
  • load testing tool

Answer it first, then compare. Nothing here is saved or scored.

Model answer

k6 uses JavaScript for test scripts. Key concepts: (1) Virtual Users (VUs) simulate concurrent users. (2) Stages define ramp-up/down patterns. (3) Checks are assertions (status code, response time). (4) Thresholds define pass/fail criteria (p95 < 500ms). (5) Groups organize requests into logical transactions. (6) Tags enable filtering results by endpoint/feature. Typical script: export options with stages, export default function with http.get/post calls and checks. Run with k6 run script.js or k6 cloud for distributed load.

What interviewers listen for

  • Workload modelling
    You design the load shape from product traffic, not from tool defaults.
  • Percentile literacy
    You read p50/p95/p99 separately and explain why each matters.
  • Bottleneck triage
    You correlate metrics across application, database, and infrastructure layers.
  • Capacity instincts
    You can translate a soak test into a sizing or scaling recommendation.

See all 35 performance questions

Written by , Senior QA Automation Engineer, 50+ QA candidate interviews conductedLast updated July 2026