Your first run
This tutorial takes a service of yours from no load test at all to a load run that cleans up after itself. It assumes an orchestrator is running in the environment (deploy one, or use the lab’s on localhost:18080).
1. Add the packs
Section titled “1. Add the packs”In your acceptance suite’s axx-packs.yaml:
packs: - rest - github.com/nimbusxr/stormbreaker/packs/core@v0.1.0 - github.com/nimbusxr/stormbreaker/packs/rest@v0.1.0And tell stormbreaker-core where the orchestrator is, in axx.yaml:
packs: stormbreaker-core: url: ${env:STORMBREAKER_ORCHESTRATOR_URL} token: ${env:STORMBREAKER_TOKEN}2. Describe the data
Section titled “2. Describe the data”A stream is built on axx’s fixture factories. Leave each record’s identity out of its fixtures: every record then derives one of its own, as an ordinary UUID.
factory: family: jsonidentity: - path: pickupId format: uuid-name-basedfactory: pickupdata: depot: DE-BER-1 parcels: 1count: 1000mix: - fixture: pickup#standard weight: 13. Take part with a dispatcher
Section titled “3. Take part with a dispatcher”Your team’s dispatcher prepares for what a run declares, and cleans up after it. With the dispatcher-sdk it is two functions. Deploy it beside your service, in the run’s group.
4. Write the scenario
Section titled “4. Write the scenario”@stormbreaker-group/delivery @stormbreaker-requires/pickupsFeature: Pickups hold their load
Scenario: 1000 pickups at 100 a second Given the pickups service with the following properties: | url | ${env:PICKUPS_URL} | And the pickups stream of POST requests to /pickups When the pickups stream is sent at 100 requests per second Then the load completes with no failed requests And the client's p99 latency of the load is at most 0.5 secondsRun it with axx run. The run opens, declares the thousand pickups, and waits at its gate until your dispatcher has prepared. It sends them, and then waits for your dispatcher to clean up. If your dispatcher fails to clean up, the scenario fails.
- Check SLOs from your service’s own metrics, across regions.
- Mock partners your service calls that nobody in the environment owns.