Jenkins groovy如何将测试结果上传到alm
我正在使用HP ALM v 5.2,并通过从gui创建自由风格项目上传了我的测试结果。现在我想将此步骤添加到管道中,我在internet上搜索并找到了此指南,但出现以下错误Jenkins groovy如何将测试结果上传到alm,jenkins,groovy,jenkins-pipeline,hp-alm,Jenkins,Groovy,Jenkins Pipeline,Hp Alm,我正在使用HP ALM v 5.2,并通过从gui创建自由风格项目上传了我的测试结果。现在我想将此步骤添加到管道中,我在internet上搜索并找到了此指南,但出现以下错误没有已知的接口实现jenkins.tasks.SimpleBuildStep名为TestResultToALMUploade,除了许多例外 这是代码示例 junit testResults: '**/target/*-reports/TEST-*.xml', allowEmptyResults: true step (
没有已知的接口实现jenkins.tasks.SimpleBuildStep名为TestResultToALMUploade
,除了许多例外
这是代码示例
junit testResults: '**/target/*-reports/TEST-*.xml', allowEmptyResults: true
step ([$class: 'TestResultToALMUploader',
almServerName: 'HP ALM Server', //almServerName
credentialsId: 'ALM-CREDENTIALS',
almDomain: 'ALMDomain', // almDomain
almProject: 'AlmProject', //almProject,
testingFramework: 'JUnit', //testingFramework
testingTool: '', //testingTool
almTestFolder: 'TestHPALM', //almTestFolder
almTestSetFolder: 'TestHPALM', //almTestSetFolder
almTimeout: '-1', //almTimeout
testingResultFile: "**/junitResult.xml", //testingResultFile
jenkinsServerUrl: '' //jenkinsServerUrl
])
我不确定您是否已经找到了答案,但我设法将此片段添加到“发布者”部分:
job {
parameters { ... }
steps { ... }
... // some other job configuration here ...
publishers {
archiveJunit("junitReport.xml")
testResultToALMUploader {
almServerName('HP ALM Server')
credentialsId('ALM-CREDENTIALS')
almDomain('ALMDomain')
almProject('AlmProject')
testingFramework('JUnit')
testingTool('')
almTestFolder('TestHPALM')
almTestSetFolder('TestHPALM')
almTimeout("")
testingResultFile("**/junitResult.xml")
jenkinsServerUrl('')
}
}
}