【发布时间】:2019-02-11 03:20:56
【问题描述】:
我正在尝试使用 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 (
^
【问题讨论】:
-
我不得不做一些不同的事情 - 解决方案在这里 - stackoverflow.com/a/60284044/9423651
标签: jenkins jenkins-plugins jenkins-pipeline xunit jenkins-mstest