About Properties test step
Use the Properties test step to define properties to use them in other test steps of your project.
Unlike properties defined at the test case level, the Properties test step allows you to:
-
Organize a large number of properties into multiple test steps.
-
Load property values from or save them to an external file during the test run.
Editing Properties test step
You can modify settings of the test step in its editor:
The test step editor contains a list of properties and their values. You can use each of them in your tests.
To add a new property, click on the test step toolbar and specify its name and value.
Property values in the Properties test step do not support property expansion. |
To remove the existing property from the list, click on the test step toolbar.
The Load from and Save to settings specify the file names that the test step reads values from and saves values to automatically during the test run.
Property list
Besides the test step editor, you can adjust the test step’s behavior by using its properties in the Properties Step Properties and Custom Properties Test Step Properties panels in the Navigator.
Properties Step Properties | View ↓
Name | Description | ||
---|---|---|---|
Create Missing on Load |
Specifies the test step’s behavior when it is loading properties from the file specified in the Load from text box:
|
||
Description |
Text describing the test step. |
||
Discard Values on Save |
Boolean. Specifies whether the test step clears all the property values after saving or closing the project. Enable this property if the test step stores some secure data like passwords. For example, one of your requests gets secure data from a server, and you store it to a property. Set Discard Values on Save to |
||
Name |
The test step’s name. |
||
Save before Load |
Boolean. Specifies whether the test step saves data to the file specified in the Save to text box before loading data from the file specified in the Load from text box. Default value: false.
|
Name | Description | ||
---|---|---|---|
Name |
The test step’s name. |
||
Description |
Text describing the test step. |
||
Create Missing on Load |
Specifies the test step’s behavior when it is loading properties from the file specified in the Load from text box:
|
||
Save before Load |
Boolean. Specifies whether the test step saves data to the file specified in the Save to text box before loading data from the file specified in the Load from text box. Default value: false.
|
||
Discard Values on Save |
Boolean. Specifies whether the test step clears all the property values after saving or closing the project. Enable this property if the test step stores some secure data like passwords. For example, one of your requests gets secure data from a server, and you store it to a property. Set Discard Values on Save to |
Custom Properties Test Step Properties
This page contains properties that you created in the test step editor. You can use the tab’s toolbar items to create and delete properties, save them to and 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.
Here is a description of some commands:
-
Load from – Specifies a file from which the test step will load the properties. You can specify the fully-qualified name of your local file or URL to a remote file. Click to browse for the desired file. Besides that, you can use the property expansion syntax to specify a property containing the desired path.
If you specify the file by typing it, ReadyAPI will not load properties immediately. Click to load properties from a file. -
Save to – Specifies a file to which the test step will save the properties. You can specify the fully-qualified name of your local file or URL to a file in your network. Click to browse for the desired file. Also, you can use the property expansion syntax to specify a property containing the desired path. The resulting file is a simple text file. Each line in the file corresponds to a separate property, specified in the
Property=Value
format. You can use it later to load property values to your tests.Note: ReadyAPI will save the list of properties to the specified file before loading values from the file specified in the Load from field.
Logging
When the test step is run as part of a test case, you can see the run log in the Transaction Log panel.
Working with
Below, you can find information on common tasks that you can perform with the Properties test step.
Save properties to file
To save properties to a file, click and select the file.
Load properties from file
To import properties from a file:
-
Click and specify the file to be imported in the ensuing Load Properties dialog.
-
If the file contains properties that are not specified in the request, ReadyAPI can create them. For this, enable the Create Missing option.
-
If the request contains properties that are not specified in the file, ReadyAPI can remove them. For this, enable the Delete Remaining option.
Save properties values to file during test run
To save properties and their values to a file during the test execution, perform the following steps:
-
Specify the name of the file, to which you want to save properties, to the Save to text box on the test step toolbar. Click next to it and browse for the file in the ensuing dialog.
ReadyAPI will save the list of properties to the specified file before loading values from the file specified in the Load from field.
The resulting .property file is a simple text file. Each line in the file corresponds to a separate property, specified in the Property=Value
format. You can use this file later to load property values to your tests.
Load properties values from file during test run
To import a property value from a file during the test run:
-
Specify the name of the file, from which you want to load property values, to the Load from text box on the test step toolbar. Click next to it and browse for the desired file in the ensuing dialog.
-
The next dialog offers you to create new properties if the file contains properties that are not specified in the editor.
ReadyAPI loads properties from a file and will do it on each test step run.
See Also
About Properties
Property Transfer Test Step
Property Wait Test Step
Test Steps