0
votes

I'm running a test with JMeter 2.1.13 on Ubuntu 14.04, getting the output as csv. I use the following command line in Ubuntu 14.04 to try to get it to read the properties file to add fields to the CSV output

./jmeter -n -p /opt/apache-jmeter-2.13/bin/jmeter.properties -l n1.csv -t Apache-DB.jmx

With the following in the properties file

jmeter.save.saveservice.output_format=csv
jmeter.save.saveservice.print_field_names=true

jmeter.save.saveservice.response_code=true
jmeter.save.saveservice.successful=true
jmeter.save.saveservice.latency=true
jmeter.save.saveservice.connect_time=true
jmeter.save.saveservice.bytes=true
jmeter.save.saveservice.default_delimiter=,

It doesn't seem to pick it up, as no field headers are printed. Here's an example from the first line of the csv file

1448233211742,313,HTTP Request,200,OK,Thread Group 1-1,text,false,209666,1,1,96

I've also tried --propfile instead of -p, which didn't work. Am I doing something wrong or does JMeter not read those configuration options like it should?

Background information / helpful information for others I have managed to turn on a couple of extra fields using command line switches (just in case anyone finds this on Google). This at puts field labels on the JMeter CSV output.

./jmeter -n -Jjmeter.save.saveservice.print_field_names=true -Jjmeter.save.saveservice.connect_time=true -l n1.csv -t Apache-DB.jmx

For reference here are the JMeter default csv fields

timeStamp,elapsed,label,responseCode,responseMessage, threadName,dataType,success,bytes,grpThreads,allThreads,Latency
1

1 Answers

1
votes

The header at the top of jmeter.properties advices:

    ################################################################################
    #
    #                      THIS FILE SHOULD NOT BE MODIFIED
    #
    # This avoids having to re-apply the modifications when upgrading JMeter
    # Instead only user.properties should be modified:
    # 1/ copy the property you want to modify to user.properties from jmeter.properties
    # 2/ Change its value there
    #
    ################################################################################

Your settings are likely being overridden when default saveservice properties are loaded afterjmeter.properties.

Try putting your properties in user.properties.