Tuesday, June 18, 2013

JMeter JDBC Connection Configuration




         1.  Add Thread Group
-          Add->Config Element->JDBC ConnectionConfiguration




       2. Configuration as below:
-          Variable Name: SQL Server
-          Database URL: jdbc:sqlserver://SGNDTPB2AM59;instanceName=SQLExpress;integratedSecurity=true;database=TestAutomation
-          JDBC Driver class: com.microsoft.sqlserver.jdbc.SQLServerDriver


3.  Add JDBC Request as below:
Add->Sampler->JDBC Request
 






















-          Variable Name: SQLServer
-          Query Type: Select Statement
-          Query: select * from employee

4.  Adding configuration as below:
-    Download sqljdbc4.jar
-    Copy [sqljdbc4.jar] file into D: \apache-jmeter-2.9\lib \
-    Config [sqljdbc4.jar] in [jmeter.properties]( D: \apache-jmeter-2.9\bin)
(adding code into [jmeter.properties] : user.classpath=../lib/sqljdbc4.jar;../lib/*.jar; )

5. Report such as:


HoaLe

No comments:

Post a Comment