In ReadyAPI, you use several properties depending on your purpose:
To control behavior of an object, change Object properties.
To store values and pass them to test items, use custom properties and global properties:
Use custom properties to pass values within a single project.
Use global properties to pass values among different projects.
To get Java Virtual Machine properties, use the system properties.
Use Object Properties to modify configurations of different test items (workspace, project, test suite, load test, security test, virtual service, and so on). You can do this in the Properties tab at the bottom of the Navigator panel.
Note: If the tab is disabled, select View > Properties from the main menu.
Every item in the project – a test step, test case, test suite, load and security tests, the project itself – can have its own set of custom properties. They are available in the custom properties panel in the Navigator and/or in the editor of the test item itself.
|Note:||All these properties exist in their own scopes, so, for example, project-level properties won't override test case-level properties.|
To modify custom properties, use the toolbar at the top of the tab:
|Add a new custom property.|
|and||Move the selected property up or down correspondingly.|
|Sort the properties in the alphabetical order.|
|Clear the property values.|
|Load the properties from a file.|
|Save the properties to a file.|
|Remove the selected property.|
|Note:||Depending on a test item, some buttons may be absent.|
To import properties from a file
Click and specify the file to be imported in the ensuing Load Properties dialog.
Set the desired options of the load process:
If the file contains properties that are not specified in the test item, ReadyAPI can create them. To do this, enable the Create Missing option.
If the test item contains properties that are not specified in the file, ReadyAPI can remove them. For this, enable the Delete Remaining option.
Also, it is possible to modify global properties by using the
-G command-line attribute.
ReadyAPI is a Java application. To view the Java machine settings with which the current ReadyAPI instance was started, use the System Properties dialog. To modify these properties, use the
-D command-line attribute.
To invoke the dialog, select Help > System Properties from the ReadyAPI main menu.
Save custom properties between sessions
If the value of a custom property of a project, test suite, or test case has been changed during the test run, all the subsequent test steps will use the new value of that property. When the test run is over, ReadyAPI can either restore the value or save it for later test runs. To control this behavior, use the Save Properties Between Test Runs project property.
Set this property to false to command ReadyAPI to make a backup of custom property values before each test run and to restore these values when the test run is over so that the original property values can be used during later test runs.
Set this property to true to command ReadyAPI to save the modified property values within the project file and use these values during the subsequent test runs.
This affects custom properties of the following items:
- Test suites
- Test cases
The properties specified in the Environment settings are also affected.
To avoid losing the modified property values, save the project before closing it.
This feature is not supported in command-line runners. So, ReadyAPI does not make a backup of custom property values before the test run, nor does it restore them after the test run is over. ReadyAPI does not save the project unless you use the
-Sargument, thus, custom property values will not be modified. To learn more, see Command-Line Arguments.
Store properties locally
When you work in a team and store your project in a source control system, you might want to keep certain property values outside of it because they only make sense in your environment. In this case, you can exclude a property from the project and store it locally.
To learn more about it, see Locally Stored Properties.