Skip to main content
No Result Found
Connect & Get help from 6000+ developers on our Discord community. Ask the CommunityAsk the Community

Per VU Iterations

Control pacing with per‑VU iterations in BrowserStack Load Testing.

Depending on your preferred method, select any one of the following to set per VU iterations:

Set iterations

Select Per VU Iterations from the dropdown menu, and set the number of virtual users, iterations, and the maximum test duration.

Screenshot of various load testing configurations available on the dashboard

  • Virtual users: Enter the total number of users to simulate during the test.
  • Iterations per VU: Specify the times each virtual user runs the script.
  • Max duration: Specify the upper bound on the test runtime (in minutes).

Hybrid tests

For iterations with hybrid load tests:

Screenshot of various load testing configurations available on the dashboard specific to the hybrid load tests

  • Set iterations separately for browser and API load. You can pass any value between 1 to 100000.
  • If you also set a maximum duration, the hybrid test stops when either the configured iterations or the maximum duration is reached, whichever comes first.

Set iterations

Use iterations to control how many times each virtual user (VU) executes your test script:

  • Set iterations to a positive integer. You can pass any value between 1 to 100000.
  • Combine with duration if needed. When both are set, the test stops when either the max duration or the iterations are reached, whichever comes first.
browserstack-load.yml
vus: 5
duration: 5m
#per VU iteration
iterations: 20

Hybrid tests

For hybrid load tests (browser + API):

  • You can set iterations at the global level (outside the tests block) or at the test-level (inside the tests block) or at both levels.
  • If set at the global level, then this value applies to both browser and API tests that you configure in the tests block.
  • You can also optionally add iterations for a specific test inside the tests block. The test-level value takes precedence over the global value for that test.
  • At the global level, you must set at least one of duration or iterations. When both duration and any iterations limit are configured, the hybrid test stops as soon as one of those limits is reached.

Example hybrid configuration:

browserstack-load.yml
vus: 10
duration: 10m
iterations: 50        # 50 iterations for all VUs for both browser and API tests
tests:
    - testType: Selenium
      browserLoadPercent: 10
      iterations: 20  # 20 iterations for browser tests, global-level iterations are overridden
    - testType: k6    # 50 iterations for API tests, global-level iterations are honoured
      apiLoadPercent: 90

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