Reputation: 5892
I'm looking for a way to run a jmeter from command line, collect the data from Summary Report to some file (say every x seconds) during the execution. Then load the saved file to the jmeter to see the limeline graphs of the collected metrics.
How can I do such thing?
Upvotes: 0
Views: 3571
Reputation: 22948
Since this is already answered question I'll offer an alternative to .png image and that is .html page. Please take a look at this answer :
https://stackoverflow.com/a/11191109/169277
Upvotes: 1
Reputation: 5004
The simplest way automate getting a graph from results is to use a shell script coupled with the 'JMeterPluginsCMD' plugin that allows you to create a graph image from the command line.
Something like:
#!/bin/bash
cd /where/jmeter/is/installed
# Run Test
./jmeter.sh -n -t /path/to/mytest.jmx -l /directory/to/store/results.jtl
# Generate PNG File using plugin
java -jar CMDRunner.jar --tool Reporter --generate-png test.png --input-jtl /directory/to/store/results.jtl --plugin-type ResponseTimesOverTime --width 800 --height 600
To litterally read data from the Summary Report would take a lot more work but I imagine you could do something with awk, however I suspect that this method is not explicitly required and that reading the jtl file (after the test has completed) would work.
Upvotes: 4