1
votes

I have a simple HTTP Request sampler in a test plan. And, viewing the result through "Aggregate Report" and writing the same results to a file. I have used "SMTP Sampler" in "tearDown Thread Group" and also used the "Test Action" to wait for a while. Issue is, once I execute the test-case, in mail I got the previous run results instead of the new one.

Here is the screen-shot of my test plan.enter image description here

Please help. Thanks in advance!

1
Can you share more details / sreenshot of your SMTP sampler?TestingWithArif

1 Answers

1
votes

I don't like your "Test Action to wait for a while" approach as it may be not enough so you won't be able to tell for sure whether JMeter stored the most recent results or not.

I would suggest the following: add jmeter.save.saveservice.autoflush=true line to user.properties file (it's located under /bin folder of your JMeter installation) and on next JMeter start it will be storing every single line.

So

  1. Apply aforementioned property change
  2. Configure your SMTP Sampler to send results.jtl file
  3. Disable all the listeners.
  4. Run JMeter in command-line non-GUI mode as follows

    jmeter -n -t /path/to/your/testplan.jmx -l /path/to/results.jtl
    
  5. As an alternative to editing user.properties file you can pass the property via -J command line argument like:

    jmeter -Jjmeter.save.saveservice.autoflush=true -n -t /path/to/your/testplan.jmx -l /path/to/results.jtl
    

See Apache JMeter Properties Customization Guide for more information on JMeter properties and ways of working with them.