You use batch runs to execute a group of load tests. This topic describes the batch runs and explain how you can create and launch them.
A batch is a collection of load tests. You can run the entire collection with just one command. You can run it at a scheduled time without further user interaction.
To create and edit batch runs, you use the BatchRuns project item:
Each batch can include one or multiple load tests. You can add one test to a batch to schedule this test execution.
To invoke the Batch Run editor, double-click a BatchRun project item in the Project Explorer.
Use the following commands to add new tests to a batch, and then to run it:
|Run Selected Batch||Runs the batch opened in the editor.|
|New Item||Adds a test to the batch (see below).|
Use these commands to configure the batch run parameters:
|Stop on error||
Stops the batch run if some test finishes with an error.
Note that LoadComplete checks the test results after the test execution is over. If you want the batch run to stop right after the first error occurs in a test, enable the Stop on error settings both for the batch run and for your load tests.
|Commands LoadComplete to export summary test results to PDF files. LoadComplete saves one file per each test after that test execution is over. The PDF files have the same data and sections as the test log panels.|
|Export details||Commands LoadComplete to export detailed test results in XML files. LoadComplete saves results for a test after that test execution is over.
Use this setting, if you are going to process test results after the run. For information on the XML result format, see Structure of Exported XML Files and Data Description.
Right-click BatchRuns in the Project Explorer and select Create New Batch Run from the context menu:
This will add a new BatchRun item to the project and open it for editing.
In the batch run editor, click New Item on the toolbar to add a new test to the batch. Then choose a test from the drop-down list or enter the test name:
To change a test, simply select another test from the drop-down list.
To delete a test from the batch, select it and press DEL, or right-click the test and choose Delete from the context menu
If needed, check the Stop on error, Export summary and Export details settings. See above.
Open the batch for editing. Then click Run Selected Batch on the editor toolbar to start the batch or to schedule its run.
This will invoke the following dialog:
In the dialog, you can choose –
To run the batch right at the moment.
Run the batch at specified date and time.
Postpone the run for the specified time.
You can also set the timeout for the batch run.
Select the options you need and click OK to run the batch or to schedule its start.
Once the batch run has started, its tests will run one after another in the order they have in the batch.
You can monitor the test execution on the Graphs page.
You can also run a batch from the command line. To do this, use the following arguments:
LoadComplete.exe "C:\Work\MyProject.ltp /RunBatch:"My Batch Run 1" /Delay:"00:01:30" /TimeLimit:"00:02:00"
For more information on the /RunBatch, /Delay and /TimeLimit arguments, see LoadComplete Command Line.
After the batch run is over, LoadComplete displays a message box informing you about the results:
If you selected the Export summary or Export details setting before the run, the message box will also display the path to the resulting PDF and XML files. You can find these files any time later in the <YourProject>/Log/<BatchName_DateTime-of-the-Run> folder.
You can find detailed results of each test of a batch in the test log:
These results do not differ from the results that you get when run a test individually (not from a batch).
Tip: LoadComplete checks parameters of every test before running this test. If this check fails, the test log will not contain an error for the test, because the test log includes only the errors that occur during the test run, and the check error occurs “before” the run. An example of such an error is the error that occurs when a load test does not specify a scenario for some virtual users. To find the cause of the problem, see the error description in the Errors.log file. You can find it in the <YourProject>/Log/<BatchName_DateTime-of-the-Run> folder. LoadComplete creates this file if there are no log files that inform you about the problem.