gpt4 book ai didi

mysql - 如何在Jmeter中通过系统变量设置jdbc连接配置

转载 作者:行者123 更新时间:2023-11-30 21:53:43 25 4
gpt4 key购买 nike

由于安全原因,我们有通用测试机,一个测试人员不应该在采样器中看到另一个测试人员的 jdbc 配置详细信息,因为有可能滥用用户名和密码以及其他详细信息。

1.有没有办法为多个数据库(如MySQL、DB2和Microsoft SQL)的不同jdbc连接配置设置系统变量。例如:应用程序 X 使用 Microsoft SQL,而应用程序 Y 使用 DB2,而应用程序 Z 使用 MySQL。 Y 和 Z 是集成层。数据库 URL、JDBC 驱动程序类、用户名、密码的变量。请提供示例。

2.Tester 需要在测试开始前通过命令行运行#1 如何做到这一点?命令行是什么?。请提供示例。

3.在JDBC请求中而不是硬编码sql脚本如何发送可能包含一堆SQL脚本或单个SQL脚本的SQL脚本路径。。请提供示例。

我已经尝试了下面的截图,但总是只返回唯一的 sql 查询的结果,但是当查看采样器请求时,我看到所有发送的查询,但响应仅针对第一个查询。

enter image description here

enter image description here

enter image description here

4.对于分布式测试,需要特别注意上述事项。。请提供示例。

我怎样才能实现#1、#2、#3 和#4。

enter image description here

enter image description here

enter image description here enter image description here

以下是最新的截图对于下面的 #1 和 #2 是屏幕截图 enter image description here

enter image description here

下面#3 是屏幕截图

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

谢谢,拉吉

最佳答案

每个用户可以在命令行(-JdbUser)或使用属性文件中发送不同的属性。

将每个动态参数定义为 dbUser 作为属性 ${dbUser} 这样每个用户将有不同的连接。

关于mysql - 如何在Jmeter中通过系统变量设置jdbc连接配置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46104099/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com