大致步骤如下:
(1) 复制ORACLE的JDBC驱动JAR包文件(ojdbc14.jar)到JMeter的lib目录下。
(2) 运行jmeter.bat
(3) 建立线程组:右键测试计划->添加->Threads->线程组
(4) 建立JDBC Connection Configuration:右击线程组->添加->配置原件->JDBC Connection Configuration
(5) 在Database Connection Configuration输入Virable Name Bound to Pool的Variable Name内容
@H_404_14@650) this.width=650;" height="53" width="790" src="http://img.jb51.cc/vcimg/static/loading.png" style="margin:1em auto;padding:0px;height:auto;border-width:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-size:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;width:auto;" alt="640?wx_fmt=jpeg&tp=webp&wxfrom=5&wx_lazy" src="http://mmbiz.qpic.cn/mmbiz_jpg/icgsKnubVvjhicdRrejSB1afFgb0EPyUHNrZl7d2I58TclKxdEfL1iaIAn8Ul1g8p1KBqmAxb4wNtwVJpoqtE1uIg/0">
(6) 在Database Connection Configuration输入数据库配置信息
例如:
Database URL: jdbc:oracle:thin:@192.168.1.168:1521:ptoracl
JDBC Driver class: oracle.jdbc.driver.OracleDriver
Username: lianggzone
Password:lianggzone
附注:
Database URL 格式:jdbc:oracle:thin:@[IP地址]:[端口号]:[实例名]
(7) 建立JDBC Request:右击线程组->添加->Sampler->JDBC Request
Variable Name:和上面的 JDBC Connection Configuration填写同样的内容。
@H_404_14@650) this.width=650;" height="503" width="827" src="http://img.jb51.cc/vcimg/static/loading.png" style="margin:1em auto;padding:0px;height:auto;border-width:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-size:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;width:auto;" alt="640?wx_fmt=jpeg&tp=webp&wxfrom=5&wx_lazy" src="http://mmbiz.qpic.cn/mmbiz_jpg/icgsKnubVvjhicdRrejSB1afFgb0EPyUHNtTshibbh3TgUNKv3m8cK5cELkiafabZ4VPg4kiasYuZ56jcMFfUH4ibIlg/0">
(9)最终效果
@H_404_14@650) this.width=650;" height="342" width="241" src="http://img.jb51.cc/vcimg/static/loading.png" style="margin:1em auto;padding:0px;height:auto;border-width:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-size:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;width:auto;" alt="640?wx_fmt=jpeg&tp=webp&wxfrom=5&wx_lazy" src="http://mmbiz.qpic.cn/mmbiz_jpg/icgsKnubVvjhicdRrejSB1afFgb0EPyUHNB4mic0ib79XNicxYBvFP9n7gpE4Cbj2uiaOIeyphZ0atPklhTibrsYPLJoQ/0">
更多内容见:http://edu.51cto.com/course/2324.html
如果对你有一丢丢帮助,转发+点赞=支持