Jenkins管道:未找到此类DSL方法'perfReport'

xoshrz7s  于 2022-12-26  发布在  Jenkins
关注(0)|答案(1)|浏览(145)

我收到错误没有找到这样的Dsl方法'perfReport'

post {
always
// sh '1s -ltr target/jmeter/reports*
sh sh
mkdir -p target/jmeter_results/*
sh
"cp -a target/jmeter/reports/*/* target/imeter results/"
sh
'op -a target/jmeter/results/*.cav target/jmeter_results/results.txt*
"ep -a target/jmeter/logs/*.log target/jmeter_results/Jmeter.jmx.log* sh
'ls -ltr target/imeter results/' archiveArtifacts artifacts: 'target/imeter results/*, allowEmptyArchive: true, fingerprint: true, caseSensitive: true, onlyIf
publishHTML (target: [allowMissing: false, alwayslinkToLastBuild: true, keepAll: false, reportDir: "target/imeter results/. reportFiles:
index.html'
reportName:
"Performance Test Result*
//reportTitles:
])
perfReport errorFailedThreshold: 5, errorUnstableResponseTimeThreshold: 'results.txt:1000*, errorUnstableThreshold: 2, excludeRespe
changed {
notifybuildstatus (currentBuild.currentResult)
def notifybuildstatus (buildstatus)
def status
switch (buildStatus) {
case SUCCESS' :
status = ' GREEN*
break
case 'UNSTABLE*:
status = 'AMBER*
break
case FAILURE::
status break
"RED*
yb3bgrhw

yb3bgrhw1#

此错误可能意味着:

  1. The performance plugin没有安装在你的jenkins上. This post解释了你如何能看到哪些插件被安装.
    1.你有一个打字错误,属性名称是错误的,或者值的类型与expexted不同,例如插件需要一个bool,但你传递的是一个字符串。
    在你的代码中,errorUnstableResponseTimeThreshold的值有一个星号(*)而不是右引号(')。这可能是原因。该命令被截断,所以很难说其他键是否有有效值。你可以尝试使用管道片段生成器来确保语法正确,但我不确定这个插件是否支持它。

相关问题