free版
build下
D:
cd D:\pyproj\learn
pytest cases\test_user. py --alluredir. /result
post-build action
allure report
path result
新版一定要在机器上设定好环境变量,路径就行,java cmd的system32都要,工具allure不要到bin,上一级就好
free 新版
pytest --alluredir=result
pipine新版版
pipeline {
agent any
stages {
//…
stage(‘执行测试用例’) {
steps {
bat “”"
E:
cd pythonlearn\proj\pytest_allure_jenkins
pytest --alluredir=“D:\Program Files (x86)\Jenkins\workspace\pytest_pipeline\allure”
“”"
}
}
}
post {
always{
script {
allure includeProperties: false, jdk: ‘’, report: ‘E:\pythonlearn\proj\pipeline-allure-report’, results: [[path: ‘allure’]]
}
}
}
}
'''
}
}
'}}