How can I duplicate parameters?
I'm not sure this has been raised before but I thought I'd ask anyway.
I'm trying to run a GET request that represents a filter that can have two or more values passed to it. The url in the request is something like this:
The above is a valid URL but it is not accepted in SoapUI. (the software actually crashed when I attempted to force it using 'New Resource').
What would be a great alternative?
Thanks for the help.
Solved! Go to Solution.
This answer should work
- in Resource or in Method, add parameter (use style = QUERY)
- select parameter and enable "Disable Encoding" at bottom of page
- in Request, select parameter and set Multi-Value Delimiter to \| in bottom-left properties section
- set a value of, e.g., 1|2|3 for the parameter (can use DataGen)
- request will be sent out with, e.g., parameter=1¶meter=2¶meter=3
I attempted to follow the above solution provided and got stuck after being able create the second duplicate parameter I needed. Basically, I created the non-entitized parameter (param 1) that is to be entitized and created duplicate parameter (param 2) as entitized with "disable encoding" enabled, but creating a third duplicate parameter or more is failing due to SoapUI's insistance of unique paramater names.
Can someone help? Am I missing something in the summary of steps? For instance, do I need to create a data generator after the entitized and non-entitized options are exhausted?
Can anyone respond? In order to attempt creating a third and fourth duplicate I am replacing a property character with an HTML Hex Code.
Entitize Properties is " false "
Multi-Value Delimiter is " \| "
Disable Encoding is selected "Disables URL-Encoding of the parameter value
the approved solution in this post indicates that characters shouldn't need to be entitized/encoded
I havent got my laptop so i cant try and reproduce to nail this down but ive used these instructions to do this before.
Are you remembering to set the multi-value delimiter switch in the Request Properties section (bottom left hand corner) to \|
Also then you need to input the different name parameter values (e.g. A,B,C,D) in the Name query parameter 'Value' field ensuring to separate the values using the |
Once you do this you should then see the repeated name query parm string (e.g. ?name=A&name=B&name=C&name=D ) displayed within the 'Parameters' field (adjacent to thr 'Resource' field
I made a mistake by using the example used by the previous poster as I now understand the use of the " | " delimiter when duplicate properties are in back-to-back order. My actual situation has over 150+ properties and the duplicate properties are never back-to-back within the urlencoded string. Instead there are many properties in between each duplicate, such as, this example segment...