Gatling Performance Testing: Turn real workload models into executable load-test scripts
A Gatling scenario looking like well-formed code does not mean it expresses business behavior clearly. Request chains, session data, and injection models must jointly describe a real user journey.
The Gatling Performance Testing Skill uses readable scenarios, feeders, and injection profiles to keep Scala-based load tests traceable to a business question.
This guide uses concrete scenarios to show how to collect, connect, and interpret evidence so the conclusion can support the next engineering or business decision.
Awesome QA Skills organizes Skills by language and testing stage. The series overview covers repository structure and shared installation options; this guide stays with Performance Test Gatling.
Read the source Skill first
The main prompt covers Input parsing order, Scenario selection decision tree, Defaults (use these unless the user specifies otherwise), Gotchas, Pre-delivery Checklist. Those headings are navigation; the project artifacts still provide the facts.
The source directory contains 2 example files, 3 references, 4 script entries. Start with CI integration example, Framework guide, Local smoke-test script.
From artifacts to a runnable entry point
The task is concrete: Model checkout load with Gatling, set latency and error thresholds, and correlate service metrics
The input can stay short, but it needs facts.
Journey: sign in → create order → pay → read result
Environment: staging
Available artifacts: interface definition, test account, CI command
Deliverable: src/test/scala/simulations/CheckoutSimulation.scala, plus the local command and failure evidence
The Skill should confirm versions, authentication, and data cleanup before generating files. This output fragment demonstrates structure; it does not claim a run occurred.
tool: Gatling
entry: src/test/scala/simulations/CheckoutSimulation.scala
checks: p95 latency, error rate, throughput, resource curves
run_evidence: pending
Keep run_evidence pending until a command, report, or trace exists. The source prompt also calls out Input parsing order, Scenario selection decision tree, Defaults (use these unless the user specifies otherwise).
Turn the fragment into a project skeleton
A code fragment becomes useful when its path, command, and artifacts are explicit. Start with one journey.
src/test/scala/simulations/CheckoutSimulation.scala
├── scenario and assertions
├── data or feeder
├── environment configuration
└── failure artifacts written to artifacts/
Use one reproducible local and CI command.
./mvnw gatling:test -Dgatling.simulationClass=simulations.CheckoutSimulation
Model feeder uniqueness and injection profiles before tuning assertions.
Definition of integrated
| Check | Minimum bar | If it fails |
|---|---|---|
| Repeatability | A run does not depend on leftover data | Rework setup and cleanup |
| Diagnosis | Gatling HTML report and backend resource metrics identifies the same run | Add a run ID and build ID |
| CI decision | Process exit status matches the quality gate | Fix reporter or threshold configuration |
| Maintenance | Shared authentication and setup have one edit point | Extract a fixture, specification, or user action |
Expand into errors, boundaries, and concurrency only after this journey behaves the same locally and in CI.
A prompt you can adapt
Replace the bracketed fields with project facts. Specific material leaves less room for guessing.
Use the performance-test-gatling Skill.
Task: Model checkout load with Gatling, set latency and error thresholds, and correlate service metrics
Version and environment: [requirement / build / environment]
Inputs: [file paths or links]
Scope: [included and excluded journeys]
Constraints: [accounts, data, time, compliance]
Check framework version, paths, and authentication first. Generate the smallest runnable entry, command, and artifact list. Mark unexecuted code as not verified.
Finish with open questions. Do not invent missing facts.
Use the first pass to inspect structure and gaps. Supply missing material before asking for the handoff-ready artifact.
Advanced use, from one call to a maintained flow
Maintain injection profiles, feeders, and assertions separately. Increase capacity in stages and inspect error samples and resource inflection points at each stage.
Keep a baseline for duration, pass rate, flaky cases, failure classes, and evidence completeness. Pass rate alone hides too much.
A three-Skill chain
requirements-analysis → performance-test-gatling → test-reporting
| Handoff | Payload | Receiver check |
|---|---|---|
| Upstream to performance-test-gatling | Source versions, scope, risks, open questions | Performance Test Gatling staleness and conflicts |
| performance-test-gatling to downstream | Primary artifact, evidence index, unfinished work | Performance Test Gatling executability and owners |
| Feedback to performance-test-gatling | Runs, defects, new risks | Performance Test Gatling baseline and regression update |
Do not paste three complete outputs into one large prompt. Give Performance Test Gatling a structured summary and accessible source artifacts. It saves context and makes defects traceable.
Team gates
| Gate | Check | Failure action |
|---|---|---|
| performance-test-gatling input | Version, environment, owner, accessible sources | Stop Performance Test Gatling and list gaps |
| performance-test-gatling artifact | Material claims carry basis and status | Return Performance Test Gatling for evidence |
| performance-test-gatling execution | Command, exit status, report are reproducible | Classify infrastructure or test failure |
| performance-test-gatling decision | Residual risks have accepter and date | Do not enter the next stage |
Review Performance Test Gatling adoption, human edit rate, unsupported claims, and failure-to-diagnosis time each sprint. Record a baseline for several cycles before setting targets.
Common failure modes for this tool family
- Code is generated without a run command, leaving the next person unable to verify it.
- Versions and dependencies are omitted even though Gatling configuration and reporters change.
- Tests share dirty data. API, UI, and performance suites all suffer from leftovers.
- One green run is described as long-term stability. Keep reports, logs, and retry evidence.
Install and invoke
Install the individual Skill. The series overview carries the longer installation explanation.
npx skills add https://github.com/naodeng/awesome-qa-skills/tree/main/skills/en/testing-types/performance-test-gatling -g
Invoke it with “Use the performance-test-gatling Skill,” then attach the real artifacts.
Two practical questions
Will Performance Test Gatling hand me a runnable project?
With complete definitions, versions, paths, and dependencies, it can generate a strong starting point. You still need to install dependencies, run it in your repository, and fix environment differences.
When should generation stop?
Stop when authentication, test data, or the target version is unknown. More generation would only produce a polished guess.
What should be checked first after generation?
Confirm that the entry command discovers the target file and writes failure artifacts to the agreed path. Expand coverage after that works.
Can it enter a release gate immediately?
Wait until local and CI runs use the same command, data resets cleanly, and evidence is traceable.
Run Performance Test Gatling against one real artifact and keep the input, output, and review notes. The fragments here establish structure; project evidence must still come from the project.
References
- Awesome QA Skills project:https://github.com/naodeng/awesome-qa-skills
- Awesome QA Skills series overview:https://inaodeng.com/en/blog/ai-testing/introduction_of_awesome_qa_skills/
- CI integration example:https://github.com/naodeng/awesome-qa-skills/tree/main/skills/en/testing-types/performance-test-gatling/examples/ci
- performance-test-gatling (EN) supporting references:https://github.com/naodeng/awesome-qa-skills/tree/main/skills/en/testing-types/performance-test-gatling/references/framework-spec.md
- performance-test-gatling (EN) helper script: run-local-smoke.sh:https://github.com/naodeng/awesome-qa-skills/tree/main/skills/en/testing-types/performance-test-gatling/scripts/run-local-smoke.sh
- Awesome QA Skills: performance-test-gatling (EN) Skill source:https://github.com/naodeng/awesome-qa-skills/tree/main/skills/en/testing-types/performance-test-gatling
- Performance Test Gatling Skill details:https://inaodeng.com/en/qaskills/performance-test-gatling/