Skip to main content
No Result Found
Get your setup working faster. Join our Discord for optimisation tips from elite testers. Join our DiscordJoin our Discord

Ramping iterations

Control how many script iterations start per time unit, in stages, and let BrowserStack scale virtual users to follow the rate.

The Ramping iterations load profile works like Ramping throughput, but each stage’s target counts script iterations instead of requests. Use it when one iteration of your script is one user journey, such as log in, browse, and check out, and you want to control how many journeys start, however many requests each one sends.

The rate is measured in iterations per time unit. You choose the time unit, so you can set slow or exact rates. For example, a target rate of 120 per 1m starts 2 iterations every second, and a target rate of 10 per 2s starts 5 iterations every second.

Ramping iterations is available only for API load tests and for the API side of Hybrid load tests that use k6.

Depending on your preferred method, select any one of the following to set a ramping iteration rate:

Configure Ramping iterations

To set a ramping iteration rate in the UI Builder, follow these steps:

  1. Select Ramping iterations from the Load Profile dropdown. BrowserStack fills in three stages for you: Ramp-up, Hold, and Ramp-down.
  2. Configure the following fields:
    • Time unit: Enter the period each target rate is counted over. Use a whole number of seconds, minutes, or hours between 1s and 24h, for example, 1s, 30s, 1m, or 1h. The default is 1s.
    • Max VUs: Set the maximum number of VUs the engine can allocate to start the iterations. For more information, see Max VUs.
    • Stages: Add or remove stages as needed. For each stage, select a Type, enter a Duration, and enter a Target, the number of iterations per time unit. The column header shows your time unit, for example, Target (iterations per 1m). Each type changes the rate as follows:
      • Ramp-up: The rate rises from the previous stage’s target to the Target over the stage duration.
      • Hold: The rate stays steady. After the first stage, a Hold keeps the previous stage’s target, so Target is filled in for you. In the first row, enter the rate to start at.
      • Ramp-down: The rate falls from the previous stage’s target to the Target over the stage duration.

    The Ramping iterations load profile with a time unit of 1m and three stages that ramp up to 120 iterations per minute, hold, and ramp down.

  3. Select your load zones, then click Save or Run Test.

How the stages run

The test starts at 0 iterations per time unit, unless the first stage is a Hold, in which case it starts at that stage’s target rate. Each stage moves the rate from the previous stage’s target to its own target over its duration. The total duration of the test is the sum of the stage durations.

For example, consider a time unit of 1m with the following three stages:

  • Ramp up to 120 over 1 minute.
  • Hold at 120 for 2 minutes.
  • Ramp down to 0 over 30 seconds.

About 330 iterations run in total.

Max VUs

Max VUs is the highest number of virtual users (VUs) BrowserStack can run at once to follow your stages. Each VU starts a new iteration only when its previous one has finished, so the longer one iteration takes, the more VUs you need. For example, if one iteration of your script takes 4 seconds, you need about 400 VUs for 100 iterations per second (TPS). Each VU can start at most 100 iterations per second, so a target above 100 TPS needs more than one VU. If the engine reaches the Max VUs ceiling, the achieved rate falls below the target.

Max VUs must be at least the number of load zones you select. BrowserStack splits the rate and Max VUs evenly across load zones.

BrowserStack fills in Max VUs for you based on the highest stage target rate. If you enter your own value, a Reset to auto link appears below the field. Select it to go back to the suggested value. You can set a value below the suggestion. The test still runs but might not reach the target.

Expected rate in the report

The HTTP Performance Timeline in your API test results shows Expected TPS. It’s always shown per second, whatever time unit you chose. For example, a target of 120 per 1m shows as 2 TPS.

Compare Expected TPS with Request Rate. Request Rate counts HTTP requests, not iterations, so it’s usually higher than Expected TPS. This load profile doesn’t show a per-stage delivery warning.

The HTTP Performance Timeline for a Ramping iterations test, where Expected TPS ramps up, holds, and ramps down, with Request Rate above it.

Limits

The Ramping iterations load profile has the following limits:

  • A time unit that’s a whole number of seconds, minutes, or hours, from 1s to 24h.
  • Up to 100 iterations per second for each VU.
  • 1 to 30 stages, each at least 1 second long.
  • A total duration between 10 seconds and 8 hours.
  • Target rates that are whole numbers of 0 or more, with at least one above 0.

Switch from another throughput load profile

If you switch to Ramping iterations in the UI Builder, BrowserStack carries your settings over as follows:

Validation errors

BrowserStack doesn’t save a test that breaks one of the following rules. The message appears next to the field in the UI Builder or in the CLI output:

Rule Message
Total duration is at least 10 seconds Throughput duration ‘5s’ is less than minimum (10s).
Total duration is at most 8 hours Throughput duration ‘30000s’ exceeds the maximum (28800s).
Max VUs is at least the number of load zones Max Virtual Users (1) must be at least the number of selected load zones (2).
At most 30 stages ‘stages’ exceeds maximum allowed stages (30) in throughput load profile. Provided: 31
Each stage is at least 1 second Throughput stage 0 duration ‘0s’ is less than minimum (1s).
Target rates are whole numbers of 0 or more Invalid ‘targetRps’ in throughput stage 1. Expected non-negative integer. Got: 1.5
At least one rate is above 0 Throughput load profile must have ‘startRps’ or at least one stage ‘targetRps’ greater than 0.
Stages aren’t combined with a flat duration Throughput load profile accepts either ‘stages’ or ‘duration’, not both. The total duration is the sum of the stage durations.
TPS is available for k6 only TPS (iterations per second) is only supported for k6. Use RPS for JMeter.
Time unit is set only with TPS ‘timeUnit’ is only valid for the throughput load profile with rateUnit ‘tps’. Set rateUnit to ‘tps’ or remove timeUnit.
Time unit is a whole number of s, m, or h, from 1s to 24h Invalid ‘timeUnit’ in throughput load profile. Expected a whole number of s, m or h between 1s and 24h, e.g. 1s, 3m. Got: 25h
Each VU starts up to 100 iterations per second Target 18060 iterations per 3m (100.33 TPS) is more than 1 Max VUs can deliver (100 TPS at 100 TPS per VU). Raise Max VUs to at least 2 or lower the target TPS.

FAQs

Usually Max VUs is too low for how long one iteration of your script takes. Raise it. For more information, see Max VUs. If Max VUs is already high, your system under test might be slowing down.

TPS counts iterations and Request Rate counts HTTP requests. For example, a script that sends 4 requests per iteration at 10 TPS sends about 40 requests per second.

No. BrowserStack applies the rate for you. Any sleeps in your script still count toward how long one iteration takes.

If you leave out rate-unit and time-unit, BrowserStack keeps the values already saved for the test.

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback

Is this page helping you?

Yes
No

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback!

Talk to an Expert
Download Copy Check Circle