我正在尝试使用 Xunit 插件和使用 Jenkins 管道显示 MStest、Nunit3、Nunit2 结果,但没有成功。我找不到 Xunit 插件的正确文档以及相同的所有各种必需参数。
我得到了以下链接,但它们没有多大帮助 https://www.cloudbees.com/blog/xunit-and-pipeline https://wiki.jenkins.io/display/JENKINS/xUnit+Plugin
有谁知道如何使用 Xunit 插件在 jenkins 管道中显示 mstest、nunit3 和 nunit2 结果?
以下是我用于 MStest 报告解析并出现错误的代码。我对 Jenkins 中的管道非常陌生,非常感谢任何帮助/指针!提前致谢!!
以下是我的管道代码
pipeline {
agent any
stages {
stage('Copy Test Reports') {
agent {
node {
label 'test'
customWorkspace "C:\\jenkins\\workspace\\tests"
}
}
steps {
echo 'Hello world!'
bat '''copy \\\\Precheck.xml .
copy \\\\*.trx .'''
}
post {
always {
xunit (
thresholds: [$class: 'FailedThreshold', unstableThreshold: '1'],
tools: [$class: 'MSTest', pattern: '*.trx']
)
}
}
}
}
}
Error:
Missing required parameter: "thresholdMode" @ line 19, column 21.
xunit (
^
WorkflowScript: 19: Missing required parameter: "testTimeMargin" @ line 19, column 21.
xunit (
^