【发布时间】:2019-02-12 13:22:52
【问题描述】:
我的 .jmx 文件面临多个问题。
我正在使用 bzm 并发线程组
1) 无法识别传递用户定义值的标准格式 比如:${__P(SERVER_NAME,localhost)} 而不是将“localhost”传递给我的脚本,而是将“${__P(SERVER_NAME,localhost)}”附加到我的 url。
仅传递值后,即(本地主机)它工作正常
2) 另外,我正在从 build.gradle 文件运行我的 jmeter 脚本,但我无法从它们传递 url 和其他详细信息
|SERVER_NAME|${__P(SERVER_NAME,localhost)}| --> 这段代码不工作 |SERVER_NAME|本地主机| --> 这段代码运行良好
jmeter {
jmTestFiles = [file("src/main/Jmetrscript.jmx")]
jmSystemPropertiesFiles= [file(path of my properties file)] //to add additional system properties
jmUserProperties = ["SERVER_NAME ="+System.getProperty('SERVER_NAME','localhost'), "SERVER_PORT ="+System.getProperty('SERVER_PORT','9080') ]
enableExtendedReports = true //produce Graphical and CSV reports
}
当我使用 gradlew jmRun -DSERVER_NAME=localhost 运行它时,它没有传递值。
【问题讨论】:
标签: gradle jmeter build.gradle gradlew