SoapUI - Properties


Properties are a central aspect of more advanced testing with SoapUI. Functional Testing properties are used to parameterize the execution and functionality of tests.

  • Properties can be used to hold the endpoints of services, making it easy to change the actual endpoints used during test execution.

  • Properties can be used to hold authentication credentials, making it easy to manage these in a central place or an external file.

  • Properties can be used to transfer and share session ids during test execution, so multiple test steps or test cases can share the same sessions.

Defining Properties

Properties can be defined at many levels in a project.

  • Properties that are common at the project-level can be defined at the Project level.

  • Similarly, TestSuite and TestCase specific properties can be defined at their respective levels.

  • Project specific properties are defined in the Custom Properties tab.

Defining Properties

For example, a property “ToCurrency” can be defined at the Project level by clicking the "+" symbol and entering the Property Name and Value.


Accessing Property

A property can be accessed anywhere in the Project by using Property Expansion.

Structure would be as −

  • ${#Project#PropertyName} – For Project Level

  • ${#TestSuite#PropertyName} – For Test Suite level

  • ${#TestCase#PropertyName} – For Test Case level

  • ${TestStepName#PropertyName} – For Test Step level

  • ${#MockService#PropertyName} – For MockService property

  • ${#Global#PropertyName} – For Global properties, found in File → Preference → Global properties tab. This property can be used across all projects

  • ${#System#PropertyName} – For System Property, found in Help → System properties

  • ${#Env#PropertyName} – For environment variable

The same structure can be placed at Request XML to get the value of specific attribute during run-time.

Same Structure

A property can also be considered as a variable in a computer program. If the user wants to define something which can be used somewhere else too, Properties are very useful. Properties can also define dynamically but it is dependent on Groovy script.