Forum Discussion

testingRocks's avatar
testingRocks
Occasional Contributor
7 years ago

How to pass one value from a list of values using SoapUI Pro?

I have a response like "1, 12, 19, 20, 74, 240, 241, 242, 274, 335, 343, 357, 358, 359, 360, 538, 1295, 1296, 1921, 1922, 1936, 1938, 1944, 2060, 2225, 2226, 2227, 2228, 2465, 2470" which I am storing into a Properties test step. I want to pass any one of these values like 241 or 343 to next request.

How do I get one of those values? Any suggestions are appreciated.

 

Thanks!

1 Reply

  • nmrao's avatar
    nmrao
    Champion Level 3
    Write a groovy script in between.
    Read value.
    Convert it in list by split by comma.
    Randomly pick any element from above list
    Either put it in context or at test case level so that it can be used in the next request.

    Hope this helps.