OctoPet samples¶
OctoPet is the public demo shop of OctoPerf. Each engine comes with a sample Virtual User that buys a pet on it: you can validate it and run a test in minutes, before writing a script of your own.
OctoPet is healthy by default, and it can also fail on purpose: switch one variable, run the same test again, and the report shows how each failure looks. It is a safe way to learn how to read a report.
Create a sample¶
There are three ways to get a sample:
- The Sample Project: the project created when you sign up already holds the OctoPet HTML sample.
- The Create Virtual User page: pick the JMeter Project (JMX), K6 Scripts or Playwright Project card, choose no file, then click Create Sample VU. See Create Virtual User.
- An AI assistant: the
create_sample_virtual_usertool of the MCP server creates the sample of one engine in a project.
Each sample carries a description that sums up what it does. Creating a sample again adds a new Virtual User, and runs nothing.
The three samples¶
| Sample | Engine | What it does |
|---|---|---|
| OctoPet HTML | JMeter | A buyer on the HTML pages of the shop: browses a random category and product, adds every variant to the bag, signs in, places the order and signs out. Its requests and responses are recorded, so you can compare a validation with the recording. |
| OctoPet API | K6 | The same buyer on the JSON API of the shop. The script shows groups, CSV and random variables read with row() and random(), custom metrics, thresholds and http.batch. |
| OctoPet SPA | Playwright | The same buyer in a real browser, on the single-page application of the shop, up to the confirmation of the order. Its aggregators name the resources the pages load. |
Each iteration signs in with its own demo account.
Correlate the OctoPet HTML sample¶
The OctoPet HTML sample is not correlated on purpose: every form of the shop carries a one-time token, and the recorded values are refused. Until it is correlated, its first validation fails with 403 errors. This is the demonstration of correlation: the fix is ready in the project.
To correlate it:
- Open the correlation rules of the project: the sample added
csrf,formTokenandorderNumber. - Apply them to the OctoPet HTML Virtual User.
- Validate it again: the order is now placed.
The K6 and Playwright samples need no correlation.
The shared variables¶
The samples read three variables of the project:
| Variable | Type | Content |
|---|---|---|
OCTOPET_HOST |
Constant | The address of the shop, https://pet.octoperf.com. The K6 and Playwright samples read it; the JMeter sample sends its requests to the pet.octoperf.com server of the project. |
OCTOPET_MODE |
Constant | How the shop behaves: fixed, the healthy shop, by default. See Make the shop fail. |
octopet_credentials |
CSV | 1,000 demo accounts, in the columns octopetLogin and octopetPassword. |
A sample creates these variables only when the project lacks them: a variable you already changed is kept. The three samples of a project share them, so changing OCTOPET_MODE switches every sample of the project.
Make the shop fail¶
OCTOPET_MODE picks the version of the shop the samples test. Edit its value, then run the same test again:
| Mode | What fails | Seen by |
|---|---|---|
fixed |
Nothing: the reference to compare with | Every sample |
broken |
Every failure below in turn, each one second in ten | Every sample |
slow-pool |
A connection pool too small, held while the payment provider answers | JMeter, K6 |
checkout-contention |
Checkouts queued on the stock of the same item | JMeter, K6 |
rate-limit |
A limit of requests per address far too strict | JMeter, K6 |
server-errors |
A product page that fails when its reviews do | JMeter, K6 |
slow-search |
A catalogue that gets slower as orders pile up | K6 |
slow-payment |
A payment provider called with no timeout | K6 |
heavy-pages |
Oversized photos and a banner that shifts the page | Playwright |
script-errors |
A product page that throws a JavaScript error | Playwright |
memory-leak |
Response times drifting up after about an hour at a constant load | Not in a short test |
The description of the variable, in the Variables menu of the project, lists the same modes.
The OctoPet demo SLA profile¶
The JMeter and K6 samples come with the OctoPet demo SLA profile attached:
- a warning as soon as an error appears,
- a critical alarm at 1 % of errors or above 10 seconds of response time.
Each threshold fires on a single interval, since the failures of broken last one second at a time. The profile stays silent on fixed, and raises alarms on broken.
The Playwright sample comes with the Core Web Vitals profile instead, which judges the Web Vitals of its pages.
Before running a test¶
OctoPet is shared by every OctoPerf user, so keep your test small:
- 20 to 50 users, with pauses between the pages, are enough to see every failure.
- Run on one load generator, one Location of one user profile: the demo accounts are not split between load generators, and two of them ordering with the same account make a checkout fail even on
fixed. - The shop caps the requests in flight. When other tests fill it, even
fixedanswers503at once, with the message Octopet is at its load cap: the test measured the cap, not the shop. Run it again later. - The shop is reset every night: the orders of the day disappear.
Run the demo with an AI assistant¶
The octoperf://skills/octopet-demo playbook of the MCP server walks an AI assistant through the whole demo: it creates a sample, builds a small scenario, switches OCTOPET_MODE to broken, runs the test, reads the alarms and the errors, names each failure, then switches back to fixed. It asks for your go before the run, which uses credits.