我正在运行一个循环执行 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 中查看树下循环的所有运行结果。