1. 将下载好的 jar 包放在 jmeter/lib 目录下,测试计划中导入 jar 包
2.添加 JDBC Connection Configuration 配置,参数设置如下
3. 线程组中添加 JDBC Request,请求中连接名字(test)和步骤 2 中自定义的名字(test)保持一致
4. 点击运行,查询出对应的结果
问题回归:
问题一:运行时提示:Cannot create PoolableConnectionFactory ("encrypt" property is set to "true" and "trustServerCertificate" property is set to "false" but the driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption: Error: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target. ClientConnectionId:d3f714f7-14b3-4682-a2ed-bf9350ba7a09)
原因:jmeter 连接数据库时缺少 SSL 证书
在步骤 2 中,数据库连接后面加上 trustServerCertificate=true 就不报错了。
标签:sqlserver,数据库,jar,security,jmeter,连接 From: https://www.cnblogs.com/hpzyang/p/18135705