Problem Statement: Performance test the stored procedures using JMeter
We followed following steps and did a small proof of concept to do this using mysql, Jmeter
See this tutorial if you want to use loadrunner - Click Here
What was done
Install XAMPP server - https://www.apachefriends.org/download.html - This will also install mysql which will be used for the purpose of this poc.
Creating Database,Table and a sample stored Procedure in Mysql
(
LastName varchar(255),
FirstName varchar(255)
);
CREATE PROCEDURE insertName
(IN FN CHAR(20),IN LN CHAR(20))
BEGIN
INSERT INTO test (LastName, FirstName) VALUES (LN, FN);
END //
DELIMITER ;
Calling the stored procedure using Jmeter
We followed following steps and did a small proof of concept to do this using mysql, Jmeter
See this tutorial if you want to use loadrunner - Click Here
What was done
- Install XAMPP
- Create a database in MySql
- Create a table in mysql
- Create a MySql Stored Procedure to insert a row in mysql table
- Call the stored procedure using Jmeter
Install XAMPP server - https://www.apachefriends.org/download.html - This will also install mysql which will be used for the purpose of this poc.
Creating Database,Table and a sample stored Procedure in Mysql
- Open command prompt
- Navigate to xampp\mysql\bin directory
- Connect to mysql using command : mysql -u <username> -p <password>
- Create database using command : CREATE DATABASE testing; and then connect to database "testing"
- Create a table using below command
(
LastName varchar(255),
FirstName varchar(255)
);
- Than insert a dummy row in the database
- Create a storedProcedure by following commands
CREATE PROCEDURE insertName
(IN FN CHAR(20),IN LN CHAR(20))
BEGIN
INSERT INTO test (LastName, FirstName) VALUES (LN, FN);
END //
DELIMITER ;
- Test it by calling the stored procedure
Calling the stored procedure using Jmeter