0
votes

I make a jmeter project that allows to test performance for a web service. I extract from my bdd the soap request and i store all the data in a file (xml). I created the project jmeter and specify the file. I noticed that the project jmeter send all the data and the web service execute just one soap request. So, i want to know if it is possible and how to specify to jmeter to send one by one the data from the file.

EDIT

Exemple in the file:

<soapenv:Envelope xmlns:soapenv="" xmlns:typ="">
<soapenv:Header/>
<soapenv:Body>
<typ:annonce>
    data
</typ:annonce>
</soapenv:Body>
</soapenv:Envelope>

<soapenv:Envelope xmlns:soapenv="" xmlns:typ="">
<soapenv:Header/>
<soapenv:Body>
<typ:annonce>
    data
</typ:annonce>
</soapenv:Body>
</soapenv:Envelope>

So, in my file i have two soap requests. JMETER sends the entire file, so my web service execute only the first soap request. I want that JMETER sends the first soap and after the second. It is possible to do this ?

1

1 Answers

0
votes

You can use __FileToString() function like:

${__FileToString(/path/to/your/file.xml,,)}

Directly in your HTTP Request sampler body like:

JMeter FileToString example

The function will be evaluated when the sampler will be executed so JMeter will pick up the file and send it as the request body.

See Apache JMeter Functions - An Introduction article for more information on JMeter Functions concept.