Detect Load Test Runs
This topic describes how to use a Groovy script to find out if your test case is running as a load test.
Where to use
There are several ways to run the script below:
As an event handler.
As a setup or teardown script on the project, test suite, or test case level in functional tests.
As a setup or teardown script in performance tests.
Example
The following code demonstrates how to determine if a test case is running in the command line or as a load test: