Version comparison (A/B)
A comparative run applies one test to two environments at the same time and with the same load, then answers "is B slower than A?". Side A is the baseline (usually the version in production), side B the candidate.
How to run a comparison
- Open the test, add two environments with Edit → Environments → Add environment (e.g.
testanddev), give each itsbaseaddress and save. - On the test page press the arrow next to Run → Comparative run.
- Pick one environment for Side A · baseline and the other for Side B · candidate.
- Optionally type a Version label for each side (e.g.
v2.3,v2.4). - Go on to the Equivalence check and wait for the result (at most 15 s).
Press Start comparison.
When the run ends, read the verdict card: Better, No difference, Worse, Inconclusive or Invalid.
How to prepare the environments
- Edit → Environments → Add environment.
- Enter the Environment name and Variables (e.g.
base=https://test.example.com). - Pick a Connections mapping if needed.
- (Recommended) Fill in Version endpoint (optional) (e.g.
{{base}}/version, Where the version is:$.version). Spitfire reads the version label from it. - Save.
Reading the verdict
| Verdict | Meaning |
|---|---|
| Better | At least one step is better, none is worse |
| No difference | Every step is within the acceptable difference |
| Worse | At least one step is worse than the acceptable difference |
| Inconclusive | Not enough data for a verdict; run longer |
| Invalid | A side failed, a runner dropped or a version switch was late |
+26% (±4.0%) means: the difference is +26%, and the real difference is most likely between 22% and 30%. The acceptable difference is ±10% for p95 by default.
How to run an A/A calibration
Two environments are never exactly equal. Calibration measures that natural difference and takes it out of later comparisons.
- Make sure both environments run the same version.
- The arrow next to Run → Calibrate.
- Check versions → Start calibration.
- Repeat the calibration every 30 days.
How to compare on one environment
Use the sequential mode when you have a single environment, or when both environments share a database. The sides run in turns: A, B, A, B.
- While the environment runs version A, open the comparative run dialog.
- Mode → Sequential (taking turns) → start.
- When the Waiting for the version switch card shows up, deploy version B.
- Press I switched to version B, continue. With a version endpoint, Spitfire sees the switch on its own.
How to compare from CI
- Add this command to your CI job:
spitfire cloud run "Checkout flow" --compare A=test,B=dev --label-a v2.3 --label-b "$GIT_SHA"- If the result is worse, the command exits with
98and the job turns red.
Sequential run on one environment:
spitfire cloud run "Checkout flow" --compare A=test,B=test --compare-mode sequential --label-a v2.3 --label-b "$GIT_SHA" --auto-switchGitHub Actions and GitLab examples: CI/CD.
How to compare earlier runs
- Load Testing → Compare → Select a test….
- Tick 2–6 runs → Select.
- Rows that got worse are red; Issues only shows only those.
Details
| Topic | Value |
|---|---|
| Load per side | Share of the test's load, 50% by default (25% for calibration) |
| Warm-up | 60 s by default, left out of the comparison |
| Acceptable difference | p95 ±10%, error rate ±0.5 points, confidence 95% |
| Runners | Every runner splits its VUs equally between the sides |
| CI exit codes | 0 better or no difference, 98 worse, 97 invalid, 99 B failed a threshold |
| CI options | --strict, --fail-on-inconclusive, --report comparison.pdf, --pr-comment |
| License | Free edition: 1 comparison + 2 calibrations a month; CI and schedules need compare_ci |
Common problems
| Symptom | Fix |
|---|---|
| "This test has no environments." | Add two environments under Edit → Environments. |
| Equivalence Failed | Check the environment's address and that the runner reaches that network. |
| "These two environments share a database." | Press Switch to a sequential comparison. |
| The result is always Inconclusive | Run longer, or run an A/A calibration. |
--auto-switch is refused |
Add a Version endpoint (optional) to the environment. |
402 license_limit in CI |
Start from the web UI, or upgrade the license. |
| Older runners are refused | Runners page → Update. |





