JDBC Testing with Jmeter

Data base testing with Jmeter is simple. Here I am using Jmeter2.3 and Oracle 10g.

Some of the things needs to be taken care before start testing.

1. Place the JDBC JAR file in --> Jmeter\lib folder (For Oracle 10g it will be classes12.jar)

2.Need to know the JDBC Driver class, If you don't know where to find the Driver class information, Open the Jar file using winzip or any tool for that matter and edit the OracleDriver.class in text file and there you can find the JDBC Driver Class.( oracle.jdbc.driver.OracleDriver)

3. Create Test Plan and add thread group.

4. Add the Config Element-->”JDBC Connection Configuration” and fill in all the required information, It should look like below figure.


Fig 1

5. From the above figure notice that Variable name is highlighted, what ever name you give here will be shared with the "Jdbc request default". In my example I have given variable name as "SQL". Provide the JDBC Drive Class information which you got from OracleDriver.class file.

6. Add the Config element "JDBC Request"


Fig 2

7. Give the variable name as "SQL" this name should match with "JDBC Connection Configuration" variable name.

8. If you are executing select statement, Update statement chooses appropriate Query type and put your query there.

9. Add view result tree for debugging purpose and run the script.

Hope this information will help!!!!

Comments

  1. Hello Pramod,

    I have struggling with this for a while now, hope that you can help.
    I have a sample.dat file with 1000 sql ( all of them select statements) that I want to load test using jmeter.
    The Jmeter Test plan is like this :
    Test Plan--Thread group--JDBC Connection Configuration -- JDBC REQuest
    I know that, I can test for one single query, but is it possible to have file and the sql coming out of that file and if so, how to do it?

    Thanks in advance
    Chandra

    ReplyDelete

Post a Comment

Popular posts from this blog

Ajax Testing with Jmeter

Running Junit Cases with Jmeter(Basic)