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
2018-12-23, 8715🔥, 1💬
Popular Posts:
How to generate test phone numbers for US and Canada? Test phone numbers are frequently needed in te...
How to generate email addresses? To help you to obtain some email addresses for testing purpose, FYI...
Where to find tutorials on Apache JMeter test tool? I want to know how to use Apache JMeter. Here is...
How to use HTTP protocol to post an XML message to a server? You can follow this tutorial to post an...
What are date and time test values? Date and time test values are frequently needed in testing date ...