Collections:
Auto Flush JMeter Test Result to File
How to force JMeter to automatically flush test result to file immediately after each sampler is executed? I need to send the test result file to database in the tear down thread.
✍: FYIcenter.com
You can follow this tutorial to
change JMeter configuration to automatically flush test result to file.
1. Open \fyicenter\jmeter\bin\jmeter.properties in an editor. Then find and update the following setting as shown below:
# AutoFlush on each line written in XML or CSV output # Setting this to true will result in less test results data loss in # case of Crash but with impact on performances, particularly for # intensive tests (low or no pauses) # Since JMeter 2.10, this is false by default #jmeter.save.saveservice.autoflush=false jmeter.save.saveservice.autoflush=true
2. You may change the following setting to automatically replace existing test result file, each time you run the test plan:
# Used to control what happens when you start a test and # have listeners that could overwrite existing result files # Possible values: # ASK : Ask user # APPEND : Append results to existing file # DELETE : Delete existing file and start a new file #resultcollector.action_if_file_exists=ASK resultcollector.action_if_file_exists=DELETE
3. Restart JMeter and open "\fyicenter\First-Load-Test-5.jmx". And run it again.
4. Click "Send Result to MySQL" in the "View Result Tree" screen. Then open the "Response Data" tab. You see the query result:
200 updates
Now you can query the database to review test results:
mysql> select timeStamp, elapsed, label, success from jmeter_test_result order by timeStamp desc limit 0,10; +---------------+---------+----------+---------+ | timeStamp | elapsed | label | success | +---------------+---------+----------+---------+ | 1510970705770 | 365 | Google | true | | 1510970705666 | 457 | Google | true | | 1510970704232 | 1537 | Facebook | true | | 1510970704171 | 1494 | Facebook | true | | 1510970703802 | 430 | Google | true | | 1510970703730 | 441 | Google | true | | 1510970703708 | 453 | Google | true | | 1510970703675 | 468 | Google | true | | 1510970703637 | 496 | Google | true | | 1510970703574 | 515 | Google | true | +---------------+---------+----------+---------+ 10 rows in set (0.15 sec)
Â
⇒ Convert JMeter Timestamp to Date and Time
⇠Load Test Result to MySQL Automatically
⇑ Saving Test Results to MySQL Database
⇑⇑ Apache JMeter Tutorials
2018-12-23, 7243👍, 1💬
Popular Posts:
In what order thread groups are executed in JMeter? Thread groups, including regular "Thread Groups"...
How to generate test fractional numbers? Test fractional numbers are numbers with fractions that are...
How to update hidden input value field value with WebDriver in Python? Normally, a hidden input valu...
How to call JMeter command in a Windows batch file? I want to create a single batch job to run JMete...
How to perform regular expression pattern match with multiple occurrences? To perform a regular expr...