To run that like in production we run it in production...
To adapt environment specific properties within the test plan we use Java system properties.
Step 1
Therefore we specifiy a new thread group and use our tomcat access logs which will parsed by JMeter "Access Log Sampler" (Parser: TCLogParser).
To adapt prod specific properties, we use JMeter properties featuere and set:
Server: ${__P(solrserver)}
Port: ${__P(solrport)}
LogFile: ${__P(logfile)}
Step 2
We copy the jmx File to our prod server which runs the tests.
and start them via:
jmeter -n -Dsolrserver=localhost -Dsolrport=11011 -Dlogfile=/var/log/tomcat-server/solr21-1/access-2012-11-06.log -l log.jtl -j jm.log -t TestPlan.jmx -Dsummariser.name=summary -Dsummariser.out=true -Dsummariser.interval=4
The "Summariser" params leads to log some output to console window, like here:
...
summary + 510 in 7s = 73.3/s Avg: 72 Min: 0 Max: 874 Err: 0 (0.00%) Active: 6 Started: 6 Finished: 0
summary = 109375 in 752s = 145.4/s Avg: 40 Min: 0 Max: 1946 Err: 420 (0.38%)
summary + 420 in 6.2s = 67.6/s Avg: 83 Min: 1 Max: 878 Err: 0 (0.00%) Active: 6 Started: 6 Finished: 0
...
see also:
http://jmeter.apache.org/usermanual/functions.html
Keine Kommentare:
Kommentar veröffentlichen