Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jmeter - generate xml

I have a J2EE application that needs some extensive integration testing. I am using Jmeter to generate HTTP POST requests. So far I manage to send them to the server correctly but the xml is static.
I am looking for a way to insert dynamic/random values into the XML and then send it to the server. Something like a PreProcessor but I am not sure how it is done.

Can anyone provide:
1. JMeter tutorials?
2. How to generate dynamic/random xml content to HTTP request
3. JMeter examples

Many thanks,
Gadi.

like image 548
Gadi Avatar asked Nov 06 '22 16:11

Gadi


1 Answers

JMeter guidelines strongly recommend to use pre-generated data to have good perfomance and accuracy.

The task could be done via CSV Data Set Config component (Best Practices, section 16.5). The main idea is to generate a big test data set, save it to text file and then use as params in request template (line of CSV file per request). One can put whole request as one and only param if s/he wish.

Please be noted that JMeter 2.3.4 (latest version atm) has some restrictions:

  • it doesn't understand multiline values (though such ones supported by CSV standard itself), so escaping might be required;
  • it doesn't understand column names, so it is possible to associate variables by column position only (not by logical name unfortunately).

Thanks, Maksim

like image 79
Maksim Liauchuk Avatar answered Nov 15 '22 07:11

Maksim Liauchuk