下载Jmeter数据库连接jar包

路径:https://jdbc.postgresql.org/download.html

 

将下载成功的jar包(postgresql-42.2.12.jar)放到Jmeter安装路径lib下,重启Jmeter即可

 Jmeter连接postgresql数据库进行压测

创建测试计划以及线程组

添加JDBC Connection Configuration

添加方式 

Jmeter连接postgresql数据库进行压测

配置 

Jmeter连接postgresql数据库进行压测

验证查询

验证查询的列表可以配置 jdbc.config.check。查询属性,默认情况下:

hsqldb:select 1 from INFORMATION_SCHEMA.SYSTEM_USERS

Oracle:select 1 from dual

DB2:select 1 from sysibm.sysdummy1

MySQL:select 1

Microsoft SQL Server (MS JDBC driver):select 1

PostgreSQL:select 1

Ingres:select 1

Derby:values 1

H2:select 1

Firebird:select 1 from rdb$database

数据库URL格式: jdbc:数据库类型://服务器地址:端口号/数据库名  

如:jdbc:postgresql://30.1.0.22:5432/smpqz0506

添加JDBC Request

添加方式

Jmeter连接postgresql数据库进行压测

 配置

  Jmeter连接postgresql数据库进行压测

查看运行结果

 Jmeter连接postgresql数据库进行压测

 

相关文章:

  • 2022-01-04
  • 2021-05-10
  • 2022-01-13
  • 2021-08-15
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-09-07
  • 2021-06-06
  • 2021-11-12
相关资源
相似解决方案