Properties Test Step

Applies to ReadyAPI 3.56, last modified on November 21, 2024

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:

Properties test step editor

Click the image to enlarge it.

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.

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:

  • If the property is false (default), the test step loads values of only those properties that you created in the editor. If a property in the file is missing in the editor, ReadyAPI will not load it.

  • If the property is true, the test step loads values of all the properties found in the file. If some property is not in the editor, ReadyAPI will create it.

The property applies only when loading properties during the test run by using the Load from text box. It will not apply when loading properties at design time by using the Load Properties dialog.
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.

The property applies only when loading properties during the test run by using the Load from text box. It will not apply when loading properties at design time by using the Load Properties dialog.
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 true to command ReadyAPI to clear the property value after closing the project.

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.

Properties test step toolbar

Click the image to enlarge it.

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.

To save properties to a file, click and select the 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.

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.

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

Highlight search results