0

我正在使用 HP ALM v 5.2 并通过从 gui 制作自由样式项目来上传我的测试结果现在我想将此步骤添加到管道中,我在互联网上搜索并找到了本指南,但给了我这个错误,但no known implementation of interface jenkins.tasks.SimpleBuildStep is named 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                    
    ])                
4

1 回答 1

1

我不确定,如果您已经找到答案,但我设法通过将此片段添加到“发布者”部分来做到这一点:

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('')
        }
   }
}
于 2018-12-11T16:21:52.753 回答