Gatling interview questions — Medium

298 medium-level Gatling questions from our Performance Testing bank, each with the correct answer and an explanation of why it is correct.

What this covers

Gatling appears throughout Performance Testing interviews. At medium level, interviewers are typically checking that you have used it in practice: what you configured, what broke, and how you knew it worked. Work through these, then explain your answer out loud; the second part is what interviews actually test.

20 example questions

  1. 1. "Executes an HTTP request action in a scenario" — in Gatling, this describes which of the following?

    • A. Scenario().
    • B. Exec(http(...)).correct
    • C. Percentile3 (p95).
    • D. Pause().

    Why: exec(http(...)): Executes an HTTP request action in a scenario.

  2. 2. "Report metric for 95th percentile response time" — in Gatling, this describes which of the following?

    • A. Percentile3 (p95).correct
    • B. Throttle.
    • C. Exec(http(...)).
    • D. Pause().

    Why: percentile3 (p95): Report metric for 95th percentile response time.

  3. 3. "Injection step increasing arrival rate over time" — in Gatling, this describes which of the following?

    • A. SetUp().
    • B. Pause().
    • C. RampUsersPerSec.correct
    • D. JsonPath check.

    Why: rampUsersPerSec: Injection step increasing arrival rate over time.

  4. 4. "Defines the sequence of actions virtual users perform" — in Gatling, this describes which of the following?

    • A. Scenario().correct
    • B. Percentile3 (p95).
    • C. Throttle.
    • D. SetUp().

    Why: scenario(): Defines the sequence of actions virtual users perform.

  5. 5. "Adds think time between actions" — in Gatling, this describes which of the following?

    • A. Throttle.
    • B. Scenario().
    • C. Percentile3 (p95).
    • D. Pause().correct

    Why: pause(): Adds think time between actions.

  6. 6. "Caps requests per second during a simulation" — in Gatling, this describes which of the following?

    • A. Pause().
    • B. Scenario().
    • C. Throttle.correct
    • D. Percentile3 (p95).

    Why: throttle: Caps requests per second during a simulation.

  7. 7. "Extracts or validates JSON response content" — in Gatling, this describes which of the following?

    • A. Throttle.
    • B. JsonPath check.correct
    • C. RampUsersPerSec.
    • D. Percentile3 (p95).

    Why: jsonPath check: Extracts or validates JSON response content.

  8. 8. Identify the accurate statement about Gatling:

    • A. Gatling can only start all users at the same instant with no ramping.
    • B. Gatling simulations are code-based, historically in Scala with Java and Kotlin DSLs also supported.correct
    • C. Gatling simulations are written by dragging GUI elements only, with no code.
    • D. Gatling's engine creates one operating-system thread per virtual user.

    Why: Simulation classes define scenarios, injection profiles, and assertions.

  9. 9. Which of the following statements about Gatling is TRUE?

    • A. Gatling simulations are written by dragging GUI elements only, with no code.
    • B. Feeders in Gatling cannot read CSV files.
    • C. Gatling's engine creates one operating-system thread per virtual user.
    • D. Gatling simulations are code-based, historically in Scala with Java and Kotlin DSLs also supported.correct

    Why: Simulation classes define scenarios, injection profiles, and assertions.

  10. 10. Which statement correctly describes Gatling?

    • A. Gatling simulations are written by dragging GUI elements only, with no code.
    • B. Gatling produces no reports of any kind.
    • C. Gatling can only start all users at the same instant with no ramping.
    • D. Assertions in Gatling can fail the build when global response-time or error thresholds are exceeded.correct

    Why: Assertions integrate performance gates into CI.

  11. 11. Which Gatling concept matches this description: "Defines the sequence of actions virtual users perform"?

    • A. JsonPath check.
    • B. Throttle.
    • C. SetUp().
    • D. Scenario().correct

    Why: scenario(): Defines the sequence of actions virtual users perform.

  12. 12. Which Gatling concept matches this description: "Injection step increasing arrival rate over time"?

    • A. RampUsersPerSec.correct
    • B. SetUp().
    • C. Exec(http(...)).
    • D. JsonPath check.

    Why: rampUsersPerSec: Injection step increasing arrival rate over time.

  13. 13. Which Gatling concept matches this description: "Executes an HTTP request action in a scenario"?

    • A. SetUp().
    • B. Exec(http(...)).correct
    • C. Scenario().
    • D. Throttle.

    Why: exec(http(...)): Executes an HTTP request action in a scenario.

  14. 14. Which Gatling concept matches this description: "Wires scenarios to injection profiles in a simulation"?

    • A. Exec(http(...)).
    • B. Scenario().
    • C. Pause().
    • D. SetUp().correct

    Why: setUp(): Wires scenarios to injection profiles in a simulation.

  15. 15. In Gatling, which of the following is described as: "Report metric for 95th percentile response time"?

    • A. JsonPath check.
    • B. Scenario().
    • C. Percentile3 (p95).correct
    • D. Pause().

    Why: percentile3 (p95): Report metric for 95th percentile response time.

  16. 16. In Gatling, which of the following is described as: "Executes an HTTP request action in a scenario"?

    • A. RampUsersPerSec.
    • B. Percentile3 (p95).
    • C. Exec(http(...)).correct
    • D. JsonPath check.

    Why: exec(http(...)): Executes an HTTP request action in a scenario.

  17. 17. In Gatling, which of the following is described as: "Wires scenarios to injection profiles in a simulation"?

    • A. Exec(http(...)).
    • B. JsonPath check.
    • C. Scenario().
    • D. SetUp().correct

    Why: setUp(): Wires scenarios to injection profiles in a simulation.

  18. 18. In the context of Gatling, which of the following is a correct statement?

    • A. Gatling's engine creates one operating-system thread per virtual user.
    • B. Gatling assertions cannot fail a CI build.
    • C. Feeders in Gatling cannot read CSV files.
    • D. Gatling simulations are code-based, historically in Scala with Java and Kotlin DSLs also supported.correct

    Why: Simulation classes define scenarios, injection profiles, and assertions.

  19. 19. In Gatling, which of the following is described as: "Injection step increasing arrival rate over time"?

    • A. RampUsersPerSec.correct
    • B. JsonPath check.
    • C. Pause().
    • D. Exec(http(...)).

    Why: rampUsersPerSec: Injection step increasing arrival rate over time.

  20. 20. In Gatling, which of the following is described as: "Defines the sequence of actions virtual users perform"?

    • A. RampUsersPerSec.
    • B. JsonPath check.
    • C. Scenario().correct
    • D. Percentile3 (p95).

    Why: scenario(): Defines the sequence of actions virtual users perform.

Related Performance Testing topics