Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/jenkins/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
以代码形式在管道中运行msTest项目(Jenkins)_Jenkins_Mstest_Jenkins Pipeline_Xunit - Fatal编程技术网

以代码形式在管道中运行msTest项目(Jenkins)

以代码形式在管道中运行msTest项目(Jenkins),jenkins,mstest,jenkins-pipeline,xunit,Jenkins,Mstest,Jenkins Pipeline,Xunit,我试图以Jenkins的管道作为代码运行和显示单元测试(mstest)。将mstest的结果文件转换为xml后: bat 'C:\\msxsl\\msxsl.exe C:\\Artifacts\\res.trx "C:\\msxsl\\mstest-to-junit.xsl" -o JUnitLikeResultsOutputFile.xml' 我想将结果发送给stdout: step([ $class: 'XUnitBuilder', testTime

我试图以Jenkins的管道作为代码运行和显示单元测试(mstest)。将mstest的结果文件转换为xml后:

bat 'C:\\msxsl\\msxsl.exe C:\\Artifacts\\res.trx "C:\\msxsl\\mstest-to-junit.xsl" -o JUnitLikeResultsOutputFile.xml'
我想将结果发送给stdout:

step([
                    $class: 'XUnitBuilder', testTimeMargin: '3000', thresholdMode: 1,
                    thresholds: [
                        [$class: 'FailedThreshold', failureNewThreshold: '', failureThreshold: '0', unstableNewThreshold: '', unstableThreshold: ''],
                        [$class: 'SkippedThreshold', failureNewThreshold: '', failureThreshold: '', unstableNewThreshold: '', unstableThreshold: '']
                    ],
                    tools: [[
                        $class: 'MSTestJunitHudsonTestType',
                        deleteOutputFiles: true,
                        failIfNotNew: true,
                        pattern: 'JUnitLikeResultsOutputFile.xml',
                        skipNoTestFiles: false,
                        stopProcessingIfError: true
                    ]]
                ])
但我得到的回报是:

[xUnit] [INFO] - Starting to record.
[xUnit] [INFO] - Processing MSTest-Version N/A (default)
[xUnit] [INFO] - [MSTest-Version N/A (default)] - 1 test report file(s) were found with the pattern 'JUnitLikeResultsOutputFile.xml' relative to 'xxx' for the testing framework 'MSTest-Version N/A (default)'.
[xUnit] [WARNING] - All test reports are empty.
[xUnit] [INFO] - Check 'Failed Tests' threshold.
[xUnit] [INFO] - Check 'Skipped Tests' threshold.
[xUnit] [INFO] - Setting the build status to SUCCESS
[xUnit] [INFO] - Stopping recording.
为什么所有的结果都是空的?这是input.xml文件:

<?xml version="1.0" encoding="UTF-16"?>
<testsuites xmlns:a="http://microsoft.com/schemas/VisualStudio/TeamTest/2006" xmlns:b="http://microsoft.com/schemas/VisualStudio/TeamTest/2010">
<testsuite name="MSTestSuite" tests="1" time="0" failures="0" errors="0" skipped="0">
<testcase classname="xxx" name="xxx_Success" time="0.3706411">
<system-out></system-out>
</testcase>
</testsuite>
</testsuites>

我做错了什么