Allure 显示的一个结果尽管在 jenkins 中循环运行 Pytest

问题描述 投票:0回答:0

我正在运行一个循环执行 pytest 的 Jenkins 作业。这是我正在使用的代码片段:

  stage("tests") {
    steps {
      withAllureUpload(serverId: 'allure-testops', projectId: '1', results: [[path: 'allure-results']]) {
        sh """
        export PYTEST_ADDOPTS="--alluredir=$WORKSPACE/allure-results"
        pytest --loop=10 test_file.py 
        """
      }
    }
  }
}

但是,当我在 Allure TestOps 中检查测试结果时,我只看到一次运行的结果,而不是循环中的所有运行。你对如何解决这个问题有什么建议吗?

预期:在 Allure TestOps 中查看树下循环的所有运行结果。

jenkins devops allure jenkins-job-dsl
© www.soinside.com 2019 - 2024. All rights reserved.