SoapUI Properties
The term properties are used to represent the characteristics of the specific object. The SoapUI properties provide the ability to add and store the configurations of endpoint services, login credentials, etc. that make it easier to change the actual endpoints during the execution of a test. It is also useful to distribute and transfer the common session ids of the particular web service that can be tested during the test cases’ execution and the test steps.
Types of SoapUI properties
- Default Properties: Default properties are those properties that are inbuild in the SoapUI tool, or we can say that as soon as the new project create in a SoapUI.
- Custom / User Defined Properties: Custom or user-defined properties can be defined at any stage of project creation such as test case, test suite, test steps, global, etc.
Defining Properties
SoapUI properties can be defined at multiple levels in a Project.
Workspace Default Properties
When we click or select the Workspace in the Projects Navigator, it shows the Workspace’s default properties, as shown below.
Project Default Properties
When we click or select a Project in the Projects Navigator, it shows the Project’ default properties, as shown in the below image.
Service Default Properties
When we click or select a Web Service in the Project Navigator, it shows the Web Service’s default properties, as shown in the following image.
Operation Properties
When we click or select an Operation property of the Project, it shows the default properties of the operation properties, as shown in the following image.
Request Default Properties
When we click or select a Web Request from the Operation Properties, it shows the Web Request’s default properties, as shown in the following image.
Custom Properties
The user-defined or Custom properties are the set of properties used by the end-user according to the service requirement in a project. Generally, these properties are defined at the test level in a SoapUI test.
In the SoapUI tool, create a custom property for the test step according to the steps given below.
Step 1: Right-click on the Test Steps and then click on Add Step and then select Properties, as shown below.
Step 2: After selecting the Properties, it shows a dialog box in which we have to provide the name for new step. We have provided the name Execute Properties.
Step 3: After specifying the new step’s name, SoapUI shows the below screen to add the test case’s properties.
Step 4: To add a new property, click on the highlighted (+) button, as shown in the above image. After that, it allows us to set the property’s Name, that is the Sum, and the property’s value is 20. Similarly, we can add more custom properties to the defined test step to validate the test case and perform some other action in a SoapUI.
Global Properties in SoapUI
Global properties are used to define globally associated properties in a SoapUI tool. The properties of the SoapUI can be accessed from any workspace, project, test suite, test case, and more.
Defining the Global Properties in SoapUI
Follow the steps given below to define the global properties in SoapUI.
Step 1: We can directly access the global properties by clicking on the Preferences tab presented in the toolbar.
Or go to the File menu and select the Preferences option, as shown below.
Step 2: After clicking on the Preferences tab, it shows the below image.
Step 3: Now select the Global Properties. After that, click on the (+) icon to add global properties and then define the Request as the name for the property whereas, Response is the value for the global properties, as shown below.