is it possible to loop a test so that it fires a request against different end points?
I was hoping to fire a test against an endpoint, write out the response to excel;
loop again, run the same test against a new endpoint, write out the response and repeat.
I have searched around this community and google, and I can't seem to find an explanation that helps me with this scenario.
Any help would be greatly appreciated.
Thanks in advance for the help.
Solved! Go to Solution.
nmrao, richie, thank you for the input.
If you are automating the tests, then the below approach should work well.
- Use project level custom property for endpoint's host & port.
- Invoke tests command line using test runner and pass endpoing details as command line options
- Repeat the same for other endpoints
- Of course, you may also use different environment each time test is invoked via command line options (never used this approach through )
Refer document for invoking tests command line
Thanks @richie for the reply,
this was potentially the best solution, except SoapUI/ReadyAPI really doesn't like more than one datasink in one test case.
I set it up as you had described, but only the last datasink outputs data to the excel sheet. (I think that might be a bug with Soap?)
I tested it also, I deleted any two of the data sinks and the remaining datasink output data to the sheet.
The same happened when any of the data sinks were left.
Many Thanks for the response all the same.
thanks @nmrao ,
I am setting these tests up for another team; so using the UI was the hope, as they may want to maintain/amend the tests and wouldn't be experienced with code.
@nmrao I had a look at your response a little more in depth, and I agree that there is much less coding involved than I initially thought; if any.
There is still seemingly no way to loop the cases on the endpoint this way; as in run the same test case each time against 3 endpoints, then move onto the next testcase?
I will look into the command line in the future for running my tests, however, I am setting up these tests for someone who may only be comfortable with "point and click", so I have to keep it as simple as possible.
Thanks for your help on the matter, you have helped me in the past as well and I appreciate it!
I have done a good bit of research on this one @richie
the datasinks work if you use different excel sheets for each one; but that is no use to me unfortunately
they are relatively simple tests.
I had initially hoped, that I could loop this test, and run it against a few endpoints, so that I would get 2 values output from each test.
Then, you had suggested setting up the requests individually (your first message).
However, the issue with the datasinks meant it would only output the last value extracted.
Do you know is there somewhere I can log that as a bug/defect?