Nahor
Nahor

Reputation: 93

How to generate a log file which includes the results of the samplers that are executed in the JMeter script

I want to generate a log file which includes the results of the samplers that are executed in the JMeter script. One thing to clear I don't want the file which is present in the bin folder. I am looking to create a new log file.

Upvotes: 1

Views: 309

Answers (1)

Dmitri T
Dmitri T

Reputation: 168122

The easiest is going for Flexible File Writer plugin

  1. Install Flexible File Writer using JMeter Plugins Manager

    enter image description here

  2. Add Flexible File Writer to your Test Plan according to JMeter Scoping Rules

  3. Configure it as follows:

    • Filename: desired location of the output file
    • Write File Header - if you want you can specify header labels here, below example assumes 2 columns: Sampler Name and Status

      Name,Successful
      
    • Record each sample as: here you can specify metrics you want to store, for sampler name and status it will be sufficient to use the following pattern:

      |sampleLabel|,|isSuccsessful|\r\n
      

      enter image description here

  4. Run your JMeter test. Once it's completed you should see a new file containing the metrics of your choice:

    enter image description here

Upvotes: 1

Related Questions