cancel
Showing results for 
Search instead for 
Did you mean: 

Loop trough multiple Soap and Rest requests

SOLVED
Highlighted
Occasional Contributor

Loop trough multiple Soap and Rest requests

Hi guys,

 

I'm new to Soap UI and testing with it. I work for a company who is using soap and rest requests for sending messages between few applications. At the moment are queue system is being fixed and it is my job to test it under heavy load etc.

 

The problem I have at the moment is that I only know how to run these request in sequence or parallel, but I would like to have a flow in which these messages will be sent.

I send the messages from 5 different API's and have about 20 different XML SOAP/REST requests.

I've already prepared all the data source with exel files and all works fine.

 

The flow I mean could be as follow:

System 1 send an message to create an person to 3 different applications. One of these application then sends back an ID of this person to the rest of the applications etc.

 

Is there a way to do this in SOAP UI pro. My self I was thinking of doing this in For loops, but I'm not sure if this is the right way to dot it.

 

I've added a screenshot of how the setup look right now of the projects.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Hero

Re: Loop trough multiple Soap and Rest requests

Well that is tehnically possible using a groovy script but I guess maybe you could do it a little bit differently by restructuring your tests.

 

What do you mean by 'first message'? Are you using a datasource to loop through your steps? If so, can't you merge the two test cases to have something like:

 

- loop

-- send message 1 (old test case 1)

-- extract whatever data you need

-- send message 2 (old test case 2)

- endloop



If my answer helped please click on the 'Accept as Solution' button.

View solution in original post

8 REPLIES 8
Highlighted
Community Hero

Re: Loop trough multiple Soap and Rest requests

Hi @TomaszSkalski ,

 

I don't understand what the problem really is. What is it that you don't know how to solve?



If my answer helped please click on the 'Accept as Solution' button.
Highlighted
Occasional Contributor

Re: Loop trough multiple Soap and Rest requests

The exact problem is that I can run each test case separately. What it does now it first sends for example 1000 messages from the first test case then 1000 of the second and so on.

What I would like to have is that it send first message of the first test case then the first message of the second and so on.

 

Is it more clear like this?

Highlighted
Community Hero

Re: Loop trough multiple Soap and Rest requests

Well that is tehnically possible using a groovy script but I guess maybe you could do it a little bit differently by restructuring your tests.

 

What do you mean by 'first message'? Are you using a datasource to loop through your steps? If so, can't you merge the two test cases to have something like:

 

- loop

-- send message 1 (old test case 1)

-- extract whatever data you need

-- send message 2 (old test case 2)

- endloop



If my answer helped please click on the 'Accept as Solution' button.

View solution in original post

Highlighted
Occasional Contributor

Re: Loop trough multiple Soap and Rest requests

At this moment I use Excel as Data source. I have about 20 different kind of messages with each own data source.

Also as far as I know I can only use one data source loop for one request or am I wrong with this one.

Highlighted
Community Hero

Re: Loop trough multiple Soap and Rest requests

Well, yes you can. That's why I don't really get where you're stuck. 😄



If my answer helped please click on the 'Accept as Solution' button.
Highlighted
Occasional Contributor

Re: Loop trough multiple Soap and Rest requests

Okay I didn't know you can use one data source loop for multiple request.

I will try that and see if it works as I would want to.

Thanks for your help.

Highlighted
Community Hero

Re: Loop trough multiple Soap and Rest requests

Ok, just let me know if something doesn't work for you.

 



If my answer helped please click on the 'Accept as Solution' button.
Highlighted
Occasional Contributor

Re: Loop trough multiple Soap and Rest requests

I just combine the data into one data source and put all the requests together.

It works fine.

Will it work also if I combine requests from different projects?

Only thing is that they are send from 5 different API's.

New Here?
Join us and watch the welcome video:
Announcements
TechCorner Leaderboard
Compete with community members in the TechCorner Challenge and get into the Leaderboard!

Rank Participant Points Earned
1 msiadak 9
2 nmrao 6
3 HimanshuTayal 3
Top Kudoed Authors