I've recently added some delimiter-separated values (e.g., CSV) output
capabilities to JMeter.  Right now, it's not too user friendly in that all the
output specification is done via a properties file rather than through some GUI.
(GUI development makes me itch.)

I probably won't be doing much more development on this in the near future.  It
won't hurt my feelings at all if one of you jumps in and makes it better.

The following text has been added to the component reference.

-------------------------------------------

The saving and reading of test results is generic. The various listeners
generally have a panel whereby one can specify the file to which the results
will be written (or read). By default, the results are stored as XML files,
typically with a ".jtl" extension.

The information to be saved is configurable. If one specifies the "Functional
Test Mode" on the Test Plan element, one gets the largest amount of information.
If this box is not checked, the default saved data includes a time stamp (the
number of milliseconds since midnight, January 1, 1970 UTC), the data type, the
thread name, the label, the response time, message, and code, and a success
indicator.

One can get a more selective set of information my modifying the
jmeter.properties file. The following example indicates how to set properties to
get a vertical bar ("|") delimited format that will output results like:.


    timeStamp|time|label|responseCode|threadName|dataType|success|failureMessage
    02/06/03 08:21:42|1187|Backoffice Home|200|Thread Group-1|text|true|
    02/06/03 08:21:42|47|Login BO|200|Thread Group-1|text|false|Test Failed,
expected to contain: password
    etc.


The corresponding jmeter.properties file excerpt is below. One oddity in this
example is that the output_format is set to csv, which typically indicates
comma-separated values. However, the default_delimiter was set to be a vertical
bar instead of a comma, so the csv tag is a misnomer in this case.


    #---------------------------------------------------------------------------
    # Results file configuration
    #---------------------------------------------------------------------------

    # This section helps determine how result data will be saved.
    # The commented out values are the defaults.

    # legitimate values: xml, csv, db.  Only xml and csv are currently
supported.
    jmeter.save.saveservice.output_format=csv

    # true when field should be saved; false otherwise

    # assertion_results_failure_message only affects CSV output
    jmeter.save.saveservice.assertion_results_failure_message=true
    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_message=false
    jmeter.save.saveservice.successful=true
    jmeter.save.saveservice.thread_name=true
    jmeter.save.saveservice.time=true

    # legitimate values: none, ms, or a format suitable for SimpleDateFormat
    #jmeter.save.saveservice.timestamp_format=ms
    jmeter.save.saveservice.timestamp_format=MM/dd/yy HH:mm:ss

    # legitimate values: none, first, all
    jmeter.save.saveservice.assertion_results=first

    # For use with Comma-separated value (CSV) files or other formats
    # where the fields' values are separated by specified delimiters.
    jmeter.save.saveservice.default_delimiter=|
    jmeter.save.saveservice.print_field_names=true


The date format to be used for the timestamp is described in SimpleDateFormat.
Bear in mind that choosing a date format other than "ms" is likely to make it
impossible for JMeter to interpret the value when it is read in later for
viewing purposes.

Note that reading of comma-separated values is also not supported. This format
is provided for use with external viewing and data manipulation tools like
spreadsheets or databases.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to