Previous Topic: Elements of a Test StepNext Topic: Specify a Property


Properties

Test properties are name–value pairs, also known as key–value pairs.

The key to data independence, reusability, and portability in test cases is the ability to replace specific data values abstracted from them with variables. These variables are referred to as properties. Some properties are predefined and guide how the application operates. You create other properties while you are building your tests.

A sound understanding of properties is important to the creation of test cases. In the context of a test case, any time there is something that can change, it is appropriate to use a property. This scenario includes values in test steps and values in configurations, for example.

Properties can be defined in several ways. After they are defined, they are available to any subsequent steps, assertions, and filters in the test case (they are global to the test case). Properties can, with few exceptions, be overridden in a test case.

Whenever a property value is set, a Property set event is recorded. The event contains the property name and value.

Property values are not limited to string values. A property can hold strings, numbers, XML fragments, serialized Java objects, or the complete response from a test step. Many properties that are created during a test run that are available to the subsequent test steps. For example, the lisa.stepname.rsp property contains the response for the stepname step.

The following topics are included.

Specify a Property

Property Expressions

String Patterns

Property Sources

Common Properties and Environment Variables

Property Files

Use the Properties Pane