Reputation: 1117
I would like to perform a load test on a SOAP webservice.
There are two requests :
I would like to perform a load test on the createDocument method. Not rocket science, I use the SOAP sampler, very simple.
But in a second step, after the load test (for performance reason) I would to check if the document are really created by calling getDocument with the id.
My idea :
I don't know how to loop over a Java list and call a SOAP sampler for each iteration. Any idea ?
Or generally, do you have a solution more jMeter compliant ?
Thank you
Upvotes: 0
Views: 168
Reputation: 168002
In the second thread group:
Add a Beanshell Sampler which will iterate through the list with document IDs and store them into JMeter Variables, something like:
List IDs = bsh.shared.IDs;
int counter = 1;
for (String ID : IDs){
vars.put("ID_" + counter,ID);
counter++;
}
This will result in variables like:
ID_1=somedocumentid
ID_2=someotherdocumentid
....
etc.
Add a ForEach Controller and configure it as follows:
ID
CURRENT_ID
ForEach Controller will iterate through all defined variables with ID_
prefix and you will be able to refer the current value as ${CURRENT_ID}
Reference material:
Upvotes: 1