Build scenarios
Workload mix
Share one load between flows in percent, weighted branches and switches.
Real traffic is a mix: most visitors browse, some search, a few buy. This page shows how to reproduce that without code: share one load between flows in percent, and pick a branch at random or by a value inside a flow.
Share the load between flows
Open a test configuration and choose Workload mix in the Load block.

- Choose the shape of the whole load: constant users, ramp up / hold / ramp down, a fixed number of iterations, a number of iterations per virtual user, or a constant or ramping rate of iterations per second. The predefined profiles fill it in.
- Set the total: the number of virtual users, or the iterations per second.
- Give each flow its share in percent (at most two decimals). The shares must add up to 100 %: the sum is shown under the list, and Split evenly shares the load equally.
The preview shows what each flow gets. Swarmetry splits whole numbers so that they add up to the total exactly, and gives every flow at least one virtual user or one iteration where the load engine needs it. When a total is too small for the number of flows (2 virtual users for 3 flows), a problem says so: raise the total or remove a flow.
Rates are split exactly too. When a share of a rate is not a whole number (33.33 % of 10 iterations per second), the flow counts per 100 seconds instead (333 iterations per 100 s): the load engine spreads them evenly.
Each flow runs separately, under the name of the flow, so results, checks and thresholds can be split by flow: a
threshold can watch the flow buy only, for example.
Scenarios (advanced) shows the scenarios the mix makes, one card per flow, so you can edit them one by one. If you change nothing, switching back gives you the mix exactly as it was. After you edit the scenarios, you can switch back only when they still share one load shape and the mix rebuilt from them gives the same numbers again; otherwise the editor tells you why, and you keep the scenarios.
Virtual users and countries
When you start the test with another number of virtual users, Swarmetry scales the whole load first, then splits it: the shares stay exact. When the test runs from several countries, each country runs the same mix. A flow with fewer virtual users than countries runs in some countries only.
Pick a branch at random
In the workflow editor, drag Weighted branches from the palette. Each branch has a share in percent, and the shares add up to 100 %. Each time the step runs, one branch is drawn at random. A branch can stay empty: "do nothing" for that share.

The shares hold over many iterations, not in each one. A branch below 1 % in a test of fewer than 100 iterations will probably never run, and a note says so. A debug run shows which branch was drawn.
Choose a branch by a value
Drag Switch from the palette, then give it a value, usually a variable such as {{role}}. Each case lists the
values that select it, and the first case that matches runs. "3" matches 3, as in checks. When no case matches, the
Otherwise steps run, if there are any.
Imported JMeter plans
- Random Controller: weighted branches with equal shares.
- Throughput Controller in percent mode: weighted branches (its children, and nothing for the rest). JMeter spreads the runs evenly; the scenario draws them at random, and a warning says so.
- Switch Controller: a switch on its value. Each child matches its number and its name. The child named "default" becomes the Otherwise steps; without one, the first child does (a warning says so).
Ask the assistant
The assistant knows worked examples of mixes, weighted branches and switches. In the test configuration editor, ask for example: “create a test configuration Peak: 100 users for 5 minutes, 70 % browse, 20 % search, 10 % buy”.