Adding users dynamically is valuable in Multi-Test runs which assess the target server's limits. While running a load test, you might notice that the target servers are handling the load quite well. As an alternative to shutting down and starting a new test with a different configuration, you can simply add additional tests to your active Multi Test on the fly, adding more users/load. Once a test is added to the Multi Test, its results will be aggregated with the rest of the Multi Test's results, forming a big picture analysis.
You can add any test while the Multi-Test is running by simply starting the single test, then selecting the option to add it to the Multi Test.
Note: Only tests within the same project can be included in a Multi-Test.
How to Add Tests Dynamically
Step 1
Create a Multi-Test and run it.
Step 2
If you believe you could use some more load, or simply want to add another scenario to the Multi-Test, select and run your single test as usual by clicking on the 'Play' button.
Step 3
In the pop-up window, you will see an option to 'Run this test as part of a master session,' in which you can choose to run it as a single standalone test, or as part of any Multi-Test that is currently active.
If you choose to run the test under the Multi-Test, then right after the new test finishes its startup stage, its results will be aggregated together with the overall results of the Multi-Test.
In the report shown below, notice the moment in which a new test was added to the load.
How to Add Tests via the API
Alternatively, you can add a single test to a currently running multi-test via the API. To do so, perform a POST to the following endpoint:
https://a.blazemeter.com/api/v4/tests/{{testId}}/start?delayedStart=true&masterId={{masterId}}
The above API includes the following options:
- {{testID}} = The test ID of the single test you wish to add.
- {{masterID}} = The master ID of the multi-test you wish to add the single test to.
0 Comments