Tuesday, October 13, 2015

What kind of information can be saved into .jtl file when running JMeter with NON-GUI?


There are two ways we can use:

  •  modified the properties default values.  There are tons of  properties you can use to decide what you want to save into the result .jtl file. And you can find all of them from jmeter.properties file under /bin folder of your JMeter installation and they are starting with jmeter.save.saveservice.The following are default values.
#jmeter.save.saveservice.output_format=csv
#jmeter.save.saveservice.assertion_results_failure_message=false
#jmeter.save.saveservice.assertion_results=none
#jmeter.save.saveservice.data_type=true
#jmeter.save.saveservice.label=true
#jmeter.save.saveservice.response_code=true
#jmeter.save.saveservice.response_data=false
#jmeter.save.saveservice.response_data.on_error=false
#jmeter.save.saveservice.response_message=true
#jmeter.save.saveservice.successful=true
#jmeter.save.saveservice.thread_name=true
#jmeter.save.saveservice.time=true
#jmeter.save.saveservice.subresults=true
#jmeter.save.saveservice.assertions=true
#jmeter.save.saveservice.latency=true
#jmeter.save.saveservice.samplerData=false
#jmeter.save.saveservice.responseHeaders=false
#jmeter.save.saveservice.requestHeaders=false
#jmeter.save.saveservice.encoding=false
#jmeter.save.saveservice.bytes=true
#jmeter.save.saveservice.url=false
#jmeter.save.saveservice.filename=false
#jmeter.save.saveservice.hostname=false
#jmeter.save.saveservice.thread_counts=false
#jmeter.save.saveservice.sample_count=false
#jmeter.save.saveservice.idle_time=false
#jmeter.save.saveservice.timestamp_format=ms
#jmeter.save.saveservice.timestamp_format=yyyy/MM/dd HH:mm:ss.SSS
#jmeter.save.saveservice.default_delimiter=,
#jmeter.save.saveservice.default_delimiter=\t
#jmeter.save.saveservice.print_field_names=false
#jmeter.save.saveservice.xml_pi=<?xml-stylesheet type="text/xsl" href="../extras/jmeter-results-detail-report_21.xsl"?>
#jmeter.save.saveservice.base_prefix=~/
#jmeter.save.saveservice.autoflush=false

  •  We can use command-line option -D to change the jmeter.properties settings temporarily to make the test result save what we want to save into .jtl file.  for example, if we want to save the url into the .jtl, we can write the command line like this:

>>jmeter -n -t /my_jmeter_tests/testPath.jmx -l /my_jmeter_tests/test-output/test_result.jtl -D jmeter.save.saveservice.output_format=xml -D jmeter.save.saveservice.url=true

if we use -J, rather than -D, it will modify the proprieties's value permanently.

See Apache JMeter Properties Customization Guide for more details on what can be done using JMeter Properties.


 

No comments:

Post a Comment