Database Test Plan Using Jmeter for Stored Procedure Testing

Database Test Plan Using Jmeter for Stored Procedure Testing

  • perf-test.com need your contributions to build up a strong repository of performance engineering resources.

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
  1. Install XAMPP
  2. Create a database in MySql
  3. Create a table in mysql
  4. Create a MySql Stored Procedure to insert a row in mysql table
  5. Call the stored procedure using Jmeter
Details
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
upload_2015-10-7_19-6-10-png.25

  • Connect to mysql using command : mysql -u <username> -p <password>
upload_2015-10-7_19-8-56-png.26

  • Create database using command : CREATE DATABASE testing; and then connect to database "testing"
upload_2015-10-7_19-13-34-png.28


  • Create a table using below command
CREATE TABLE test
(
LastName varchar(255),
FirstName varchar(255)
);
  • Than insert a dummy row in the database
INSERT INTO test (LastName, FirstName) VALUES ('testLN1', 'testFN1');
upload_2015-10-7_19-19-40-png.29

  • Create a storedProcedure by following commands
DELIMITER //
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
CALL insertName('testFN2','testLN2');
upload_2015-10-7_22-31-51-png.31

Calling the stored procedure using Jmeter


upload_2015-10-7_22-42-53-png.32


upload_2015-10-7_22-45-10-png.33
Author
AnmolD
Views
72
First release
Last update
Rating
5.00 star(s) 1 ratings

More resources from AnmolD

Latest reviews

Good Information