Collections:
Load Test Result to MySQL Automatically
How to load JMeter test result MySQL database automatically? I have JDBC connection configured correctly for MySQL server.
✍: FYIcenter.com
You can follow this tutorial to
load JMeter test result to MySQL database automatically.
1. Start JMeter on your computer and open "\fyicenter\First-Load-Test-5.jmx".
2. Add another JDBC Request sampler in "tearDown Thread Group" with the following settings:
Name: Send Result to MySQL Variable Name Bound to Pool: localhost Query Type: Update Statement Query: load data local infile '\\fyicenter\\Test-Result.csv' into table jmeter_test_result fields terminated by ',' enclosed by '"' lines terminated by '\n' ignore 1 lines;
3. Save the test plan as "\fyicenter\First-Load-Test-5.jmx" and run it.
4. Click "Send Result to MySQL" in the "View Result Tree" screen. Then open the "Response Data" tab. You see the query result:
0 updates
So something wrong in the execution process. The design is perfect:
The root cause is that JMeter caches test results in memory and flush them to the file periodically. In the above example, when the "Send Result to MySQL" JDBC request reads the "Test-Result.csv", it is still empty.
See the next tutorial on how to force JMeter to flush out results to file immediately.
The picture below shows you how to send test result to MySQL
database with JDBC request sampler:
Â
⇒ Auto Flush JMeter Test Result to File
⇠View Result of JDBC Request Sampler
⇑ Saving Test Results to MySQL Database
⇑⇑ Apache JMeter Tutorials
2017-09-20, 3604👍, 0💬
Popular Posts:
How to generate string test values? To help you to obtain large number of string test values, FYIcen...
How to access Response Status Code 400 as Success? My sampler failed, because the server returns the...
What are JMeter command line options? You can get see JMeter command line options by running this co...
How to Pass Windows Environment Variable to JMeter? I want to use Windows temporary folder environme...
How to generate test fractional numbers? Test fractional numbers are numbers with fractions that are...