Overview
In my previous post, I have described the basic idea of getting started with JMeter. I am going to give continuation to the same Tool with a Database test design. For better understanding of this post, You might have to take a look at that one.
1. click on the bat file
Go to the bin folder of JMeter and start the Jmeter window.
2. Rename the Test Plan to Database Test
When the JMeter window starts, you are ready to develop the test. Start this process by Renaming the Test-plan to Database Test. This name is relevant to the test we are actually developing.
3. Add the Thread groups
As always, add the Thread-Group under the Database Test. Configure the timings and the number of users as described in my previous post.
4. Add the JDBC Connection Configuration
Not the actual database work begins. Add the JDBC Configuration element inside the Thread-Group. This is the element where you configure your database-server’s location and provide an access variable to this server. You could have several database configurations defined in single test plan, and choose between which one to use from the variable name you defined in those configurations.
5. Enter the configuration information
Enter the database configuration information.You can see the Database-URL, and the JDBC driver class etc. The database connector jar for that database should be in the class path of JMeter before running this test. You could do this by putting the jar in the lib/ or lib/ext/ folder of the JMeter and then restart the JMeter. The top most variable name field is where you provide a reference name for this configuration. Later you will use this same name to access this database.
6. Add Database Request Sampler
Database Request sampler is where you actually write the query to be fired and the database configuration to be used.
7. Add the queries and connection information
8. Add the appropriate listeners
This part is exactly same as my previous post.
9. Run
Summary
This example is not much, but it provide the fundamental ideas to use JMeter for database testing. You could start with this simple example and then start exploring and digging deep into the fun of JMeter. You could compare two database, simulate multiple users vs response time rise, create a graph etc.
No comments:
Post a Comment
If you like to say anything (good/bad), Please do not hesitate...