jmeter与postgresql数据库

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/weixin_38250126/article/details/82148107

测试准备

 1、Jmeter版本:3.1,JDK:1.7;
  2、postgresql驱动包postgresql-42.2.5.jre7.jar,将该jar包置于..\apache-jmeter-3.1\lib\文件下,如果不成功,需要在测试计划中添加引用到Library;
  3、postgresql的驱动包可以到官网下载:https://jdbc.postgresql.org/download.html

 jmeter配置

在线程组内添加数据连接配置 (JDBC Connection Configuration)

其中Variable Name Bound to Pool可以随意取一个名称(后面的连接请求都关联这个连接池名称)

postgres数据库配置的URL和Driver Class需要按照格式填写,如下:

Database URL格式:jbdc:postgresql://ip:port/database_name

JDBC Driver class格式:org.postgresql.Driver

 添加Select的JDBC请求

Variable Name bound to pool中的Variable Name与JDBC Connection Configuration中Variable Name bound to pool中的Variable Name保持一致;

猜你喜欢

转载自blog.csdn.net/weixin_38250126/article/details/82148107