测试 | Jenkinsfile 管道集成

qTest | Jenkinsfile Pipeline Integration

在遵循以下 link 之后,我已经将 qTest 与 Jenkinsfile 管道集成在一起。 https://www.qasymphony.com/video-training/qtest/project-admin/how-to-integrate-qtest-jenkins-pipeline-projects/

与我的管道集成后,我观察到以下错误。

com.qasymphony.ci.plugin.exception.SaveSettingException: CI Integration Setting is disabled.
    at com.qasymphony.ci.plugin.ConfigService.saveConfiguration(ConfigService.java:317)
    at com.qasymphony.ci.plugin.action.SubmitJUnitStep$SubmitJUnitStepExecution.loadPipelineConfiguration(SubmitJUnitStep.java:479)
    at com.qasymphony.ci.plugin.action.SubmitJUnitStep$SubmitJUnitStepExecution.run(SubmitJUnitStep.java:302)
Caused: java.lang.Exception
    at com.qasymphony.ci.plugin.action.SubmitJUnitStep$SubmitJUnitStepExecution.run(SubmitJUnitStep.java:305)
    at com.qasymphony.ci.plugin.action.SubmitJUnitStep$SubmitJUnitStepExecution.run(SubmitJUnitStep.java:240)
    at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.call(SynchronousNonBlockingStepExecution.java:50)
    at hudson.security.ACL.impersonate(ACL.java:290)
    at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.run(SynchronousNonBlockingStepExecution.java:47)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Finished: FAILURE

Jenkinsfile 管道脚本

stage('Publish_qTest'){
        steps{
        submitJUnitTestResultsToqTest([apiKey: 'f8810j2w-d123-1110-e22a-2c5ae5b123cd', containerID: 380012, containerType: 'release', createTestCaseForEachJUnitTestClass: true, createTestCaseForEachJUnitTestMethod: false, overwriteExistingTestSteps: true, parseTestResultsFromTestingTools: true, parseTestResultsPattern: './*.xml', projectID: 12345, qtestURL: 'https://orguk.qtestnet.com/', submitToAReleaseAsSettingFromQtest: true, submitToExistingContainer: false, utilizeTestResultsFromCITool: false])
          }
        }

您应该转到设置 -> 自动化设置并确保您已在 Qtest 实例上启用 CI 工具集成。

基本上需要启用它才能让您报告。

要将 Jenkins 与 Qtest 集成,请按照以下步骤操作。

  1. 登录 qtest 或创建试用帐户。
  2. 创建一个简单的项目并添加一些版本等
  3. 转到右上角的“设置”菜单,然后单击“自动化设置”并执行以下操作。 a) 启用自动化集成状态 b) 为通过和失败的测试用例添加映射。 c) 激活 CI 工具集成 d) Select 下拉的模块(项目名称)。将保存所有测试用例的位置。