Sometimes we need to use some values in several times in our api test, such as api end point, api methods name, user name, password etc. If these values we put in place and use these values when needed in our test. If these values changed then we need to update only a single place.
In SoapUI we can use parametrization from external files of property feature of SoapUI.
In SoapUI we can use parametrization from external files of property feature of SoapUI.
Parametrization using SoapUI properties:
In soapui properties can be created at three level
- Test Case
- Test Suite
- Project.
Click on created test case. Click on properties tab at bottom of soapUI.
Click on + icon and enter property name.
Click on + icon and enter property name.
As I created a property for endpoint url .
Similarly we can create properties for Test Suite and Project level..
How to use:
- ${#TestCase#EndPoint} for test case property.
- ${#TestSuite#EndPoint} for test suite property.
- ${#Project#EndPoint} for project property.
Sorry, this is not parameterization right, this is defining the properties not in input or hardcoding.
ReplyDeletehey aarkays,
ReplyDeleteHow can I use this process without hardcoding the value for endpoint? I need the URL to change dynamically and the value comes from a test step.
Hey aarkays,
ReplyDeleteHow to not hardcode 'endpoint'? I want the value to be dynamic - coming from a testcase.
Nicely explained
ReplyDelete