Is there any way I can add the summary report results which are generated at the end of the test in JMETER to the database ? I have created a table in in database. In this table I want to store the summary results. I am using Mysql database. How can I do this ?
Thankyou.
You can do it as follows:
c:\jmeter\results.csv
Add JDBC Connection Configuration and provide:
results
jdbc:mysql://localhost:3306/YOUR_DATABASE_NAME_HERE
com.mysql.jdbc.Driver
Add JDBC Sampler and configure it as follows:
results
Update Statement
load data local infile 'c:\jmeter\results.csv' into table YOUR_TABLE_NAME_HERE fields terminated by ',' enclosed by '"' lines terminated by '\n';
This way you will be able to get results inserted automatically.
References:
Just in case if you don't know how to create a table for results with query like:
create table test (timeStamp varchar(255),elapsed varchar(255),label varchar(255),responseCode varchar(255),responseMessage varchar(255),threadName varchar(255),dataType varchar(255),success varchar(255),bytes varchar(255),grpThreads varchar(255),allThreads varchar(255),Latency varchar(255) );
See MySQL CREATE TABLE Syntax documentation for more information.