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

Configure multiple scenarios

Create and orchestrate multiple scenarios to model complex user behavior. Configure multiple scenarios to represent different user journeys and traffic mixes in a single load test. Each scenario runs a subset of your tests with its own load configuration, and all scenarios run in parallel under one job for unified reporting.

Multiple scenarios in browser tests

Multiple scenarios in browser tests support Playwright, Selenium TestNG, and WebdriverIO.

Depending on your preferred method, select any one of the following to configure multiple scenarios:

You can configure multiple scenarios with different load parameters for each framework:

Configure multiple scenarios

The Multiple Scenarios feature in the Load Configuration section allows you to simulate diverse user behaviors by executing different test flows simultaneously within a single load test. Instead of running a uniform workload, you can define specific user journeys to run in parallel, creating a more realistic traffic simulation.

All scenarios execute concurrently during the test run. You can configure up to 10 distinct scenarios per test.

Steps to configure multiple scenarios

Enable multiple scenarios

In the Load Configuration section, enable the Multiple Scenarios toggle.

Screenshot of scenario configuration in BrowserStack Selenium load testing UI

Add a new scenario

Click Add Scenario to create a new scenario.

Configure scenario details

For each scenario:

  • Provide a unique name for easy identification.
  • Select the desired test cases using the supported selector types.
  • Provide load configuration details like number of VUs, load profile and regions.

Screenshot of multiple scenarios configuration in BrowserStack Selenium load testing UI

For Selenium tests, the following selector types are supported:

Selector type Description
Config file TestNG xml file path

This feature is currently available for TestNG only.

Add additional scenarios

Repeat the process to add more scenarios as needed, up to the maximum limit of 10 scenarios per test.

Review the configuration

Review the configuration to ensure all scenarios are set up correctly.

To run each scenario with its own dataset, see Bind test data to a scenario.

Multiple scenarios in Hybrid tests

In a Hybrid test, you can run multiple browser scenarios alongside a single shared API load. Each browser scenario models a different user journey, while the API load puts realistic backend traffic on your services in the background. This lets you measure production-like behavior in one test instead of splitting it into separate browser and API runs.

BrowserStack manages the API load’s lifetime for you, so you don’t set a duration or a load profile for it. You provide the script and the number of virtual users, and BrowserStack runs the API load for as long as the browser scenarios need it:

  • The API load starts with the first browser scenario.
  • It stops when all browser scenarios finish.
  • If any browser scenario or the API load fails, BrowserStack stops the whole test.
  • If the test reaches your plan’s limit, BrowserStack stops the test and shows a plan limit message.

A multi-scenario Hybrid test needs at least one browser scenario and one API script. Browser scenarios support Playwright, Selenium TestNG, and WebdriverIO. The API load supports JMeter, k6, and Gatling.

Select your preferred method to configure multiple scenarios in a Hybrid test:

Configure multiple scenarios in a Hybrid test

In the Hybrid test builder, the Load Configuration step has two parts: an API Load Config for the shared API load and a Browser Load Config for your scenarios.

Steps to configure multiple scenarios in a Hybrid test

Configure the API load

In API Load Config, set the number of API VUs and the load zones. You don’t set a duration or a load profile, because BrowserStack runs the API load for as long as the browser scenarios need it.

Enable multiple scenarios

In Step 3/3: Load Configuration, enable the Multiple Scenarios toggle.

The Multiple Scenarios toggle enabled in the Step 3/3 Load Configuration header

Add browser scenarios

In Browser Load Config, add up to 10 scenarios. For each scenario, provide a unique name, select the tests using the supported selector types, and set the load configuration such as VUs, duration, load profile, and load zones.

Review and save

Review the API load and all browser scenarios, then save 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