白夜有点黑
6 years agoContributor
How to Handle dynamic QUERY Style key-value parameters in my request url?
Hello Genius,
I got stuck with my soapui project and need your help to have a look, details as below:
Request URL 01: http://www.test.com/path?a=1&p_age=18
Request URL 02: http://www.test.com/path?a=1&p_age=18&p_gender=male
Request URL 03: http://www.test.com/path?a=1&p_age=18&p_gender=male&p_height=180
As you can see, there's dynamic QUERY Style key-value parameters in my request url, and the key is custom defined, it always changed, looks TEMPLATE style parameter didn't any help, is there any good solution for this scenario? Look forward for your response, thanks a lot
- There is a feature request raised regarding the same. You may give thumps up if you need it. Based on the likes, it may be productized.
https://community.smartbear.com/t5/ReadyAPI-Feature-Requests/Ability-to-parameterize-REST-API-Parameter-Names/idi-p/177123
By the way, it is possible to achieve the above using a groovy script.
A sample is available, please check below link.
https://community.smartbear.com/t5/SoapUI-Pro/A-bit-more-groovy-help-Populating-a-REST-URI-with-Properties-Set/m-p/177463
You many need to alter the script to adopt your changes.