Is there a way to configure the resource/method used by requests in tests on a test case, test suite or even project level in SOAPUI (free)?
We have the following use case:
The same REST service running on different servers(potentially different versions) and slightly different resource paths depending on configuration.
For e.g. http://server1/myRest
or http://server2/theRest
etc.
We would like to be able to run our test suites and test cases against those different endpoint/resource combinations. So far, the only way we found to change the endpoint is at test case level using the Test Case editor and to change the resource/method at test step level.
Clearly, it's not an option to duplicate all test cases / test suites for each endpoint / resource path combination or to create projects for that.
Is there a simple way to achieve that using SOAPUI (free)
?
We were able to find a solution to our problems, the key is to use project level properties.
Basically, there are 2 ways for doing this.
Now you only need to modify the project level property if you want to use another endpoint
Now you only need to modify the project level property to change the resource path.
You can also define multiple path components, e.g. /{serviceName}/{methodName} or something similar. Of course you would need 2 variables for that.
Note: if the value of your path property contains a /, you will need to edit the SOAP UI HTTP Settings in the preferences and check the Pre-Encoded Endpoints checkbox, otherwise it won't work because the / will be URL encoded
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With