Save Run results with “Simple Data Writer” in Apache JMeter

One of the things that any new person who is dealing with JMeter is facing that if you save a jmx project which is executed before the run results is not saved.

So if you didn’t know this you may lose your run results and you have to repeat again.

One of the best ways to save your run data is using “Simple Data Writer” it not only make you able to save your run data but also enable you to use the data file on any listner or graph you want or need.

Data Files

CSV is one of the file extensions you can use to save your run results as the following example.

savedatatable

In the above example the results table will be saved to a .CSV file which is good in case you want only the data shown in the table but if you want more the Simple data writter will be a better option.

What are JTL files?

JMeter can create text files containing the results of a test run.

These are normally called JTL files, as that is the default extension – but any extension can be used.

Simple Data Writer

simpledatawritter

 You can configure the results save configuration the more you save the more listners you can use.

simpledatawritterconf

I used to select them all , sometimes this leads to larger size data file but this is safer to use in different graphs and listners as i will show you later.

Lets add simple data writter to thread group and disable all the other listners and execute test as the following.

simpledatawritterwithfile

datafile

After the run is finished i’m going to open the jtl file in the following listners :

  • View Results Tree
  • Summary Report
  • Active Threads over time graph
  • Hits per second graph

viewresultsjtl

summaryreportjtl

activethreadsjtl

As shown above the results data saved using Simple Data Writer can be used in any of the default JMeter listners and also extra listners which can be added to JMeter in the feature , .JTL extension is the default saving extensions which can be re-saved to CSV file if needed , see the following Wiki Page

https://wiki.apache.org/jmeter/JtlFiles

 

 

Advertisement

3 responses to “Save Run results with “Simple Data Writer” in Apache JMeter”

  1. Hi,

    I have a question – adding simple data writer to the test plan and saving the results in a csv file so that it can be used by various listeners, i understand. But when you run command line mode, by giving the option => -J jmeter.save.saveservice.output_format=csv -l //results.csv we are able to save the results too. My question is which approach would one use and under what circumstances. Appreciate your response in advances. Thanks
    – Radha

    Like

    1. Hi Radha ,
      Saving test results to .jtl file give you more flexibility open results in any listner and also gather as much data as you want help you analyse the results later.Using the simple data writer is favorable for reducing the number of listner you use during the run to save memory and be able to generate more user and avoid memory exceptions.
      For non GUI mode , most of people use it in a non GUI environment or OSs.
      I hope that i answered your question properly

      Mohamed

      Like

Leave a Reply to Radha Cancel reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: