About Run Test Case test step
The Run Test Case test step runs a test case from your project. It works similarly to method calls in programming languages. When executing this test step, ReadyAPI runs the called test case and then returns to the original test case:
You can pass data to the target test case and get returned values to use later in the original test case.
To illustrate the usage of this test step, imagine you have actions that you need to repeat in different test cases, for example, login or logout operations, export data from a database. Instead of copying the same test steps, you create a separate test case and use the Run Test Case test step to call the test steps wherever you need it. You may also collect such test cases in a separate test suite that will work like a library with common procedures.
Editing Run Test Case test step
You can modify settings of the test step in its editor:
Here is a brief description of available panels in the request editor:
Name | Description | ||
Test step properties | The list of properties from the specified test case. You can modify its values by using the following commands:
|
||
Test Case Log | A log of the last test case run.
The toolbar of the panel has the following commands:
|
Customizing Run Test Case test step
You can modify the test case options during its creation, or later in the Run Test Case Options dialog. To call the dialog, click on the test step toolbar.
-
Target Test Case - Specifies the test case to be called. The drop-down list contains the test cases of the test suite that is selected in Target Test Suite.
-
Target Test Suite – Specifies the test suite that contains the desired test case.
-
Return Properties – Use this text box to specify the properties, to which the target test case will save resulting values. If needed, modify the target test case so that it saves resulting values to the selected properties.
Note: You can use the rest of the properties to pass values to the target test case. -
Run mode – Specifies how ReadyAPI calls the target test case:
-
Create isolated copy for each run – ReadyAPI creates a copy of the target test case in the memory and runs it. This way, the run will not affect other concurrent runs of the test case. With this mode, several copies of the target test case can run in parallel.
Notes:
-
Any property changes are lost after the execution.
-
The mode requires more memory.
-
-
Run primary Test Case (fail if already running) – ReadyAPI will run the target test case only if it is not already running. If the target test case is running, the test step will fail. Use this run mode if the test case contains steps that cannot work in parallel (like writing to the same file) and you do not want the target test case to overwrite the data produced by another run.
-
Run primary Test Case (wait for running to finish, Thread-Safe) – If the target test case is already running, ReadyAPI waits until that run is over, and then runs the target test case again. Use this mode if the test case contains steps that cannot work in parallel, but you want the target test case to run with the specified property values.
The run mode is especially important when running test cases containing the Run Test Case test step as a load test. In this case, the first option runs more smoothly but requires more memory. If you use other options, your load test will call the same instance of the test case which will either cause an error or block the execution of the load test.
-
-
Copy load test properties – Select it to use the same load test properties as in the original test case when running the target test case during a load test.
-
Copy HTTP Session – If this option is enabled, the target test step will send requests to the tested server within the HTTP session used by the original test case. If this option is disabled, the target test case will set up a new session for requests.
-
Ignore Empty Properties – If this property is enabled, ReadyAPI does not pass empty values to the target test case. In this case, ReadyAPI will use the values that are specified for these properties in the target test case’s editor.
Property list
Besides the test step editor, you can adjust test step behavior by using its properties in the RunTest Case Properties and Custom Run Test Case Test Step Properties panels in the Navigator.
RunTest Case Properties | View ↓
Name | Description |
---|---|
Description |
Text describing the test step. |
Name |
The test step’s name. |
Name | Description |
---|---|
Name |
The test step’s name. |
Description |
Text describing the test step. |
Custom Run Test Case Test Step Properties
This page contains properties that are declared in the target test case. You can check the tab’s toolbar items to clear values, save them to or load them from a file. To learn more, see About Properties.
Test step toolbar
The test step toolbar contains commands that allow you to modify the test step or appearance of the test step editor.