Stopping test runs
You can stop a test run before it is complete. For example, you might detect serious problems in the run and not want to wait for it to finish. When stopping the test run, you can choose to save the results and the test log of the run.
About this task
To stop a test run on the local computer, use this command cmdline.bat -stoprun -workspace "c:\myWorkspace".
To stop a test run from a remote computer, you can send the REST API command HTTP POST to http://hostNameOrIP:7878/executioncontrol/stoptestrun with POST data {\"btnExecFinally\":true, \"btnResultCollection\":true,\"timeout\":30,\"timeoutScale\":\"sec\"}.
For instance, you can use Curl to send the POST command.
curl
"http://hostNameOrIP:7878/executioncontrol/stoptestrun" -d "{\"btnExecFinally\":true,
\"btnResultCollection\":true,\"timeout\":30,\"timeoutScale\":\"sec\"}".
If you do not require test results and logs, abandon the test by clicking or by using the command cmdline.bat -abandonrun -workspace
"c:\myWorkspace".Argument | Description |
---|---|
btnExecFinally | Indicates whether to run the Finally block in the schedule. |
btnResultCollection | Indicates whether to collect the results for the test. |
timeoutScale | Indicates the units of time such as "milli", "sec", "min", "hour". |
Procedure
- During a test run, click .
-
In the Timeout field, type a number and select a time unit.
If you are running HTTP tests and want the results, consider selecting a duration that is long enough for a page to return.
- Optional: To collect the results and the test log until the time the test ran, select Collect test results and history. Typically, the partially run report is useful for debugging specific issues. If you do not select the check box, the report is not generated.
- Optional: To stop the execution of the test in the Finally block, clear Execute Finally block.
-
Click Stop.
The test stops after the timeout.