2013-04-15 72 views
2

我想通过xunit插件发布通过google cpp测试工具在jenkins中生成的xml格式的测试报告。在配置插件,我们必须指定pattern.Can有人请帮助如何在这种模式写,因为如果我配置任何它给这个错误如何在詹金斯发布测试结果报告?

**

[xUnit] [INFO] - [JUnit] - No test report file(s) were found with the pattern 'C:\Users\20040922\.jenkins\workspace\firstreport.xml' relative to 'C:\Users\20040922\.jenkins\jobs\jessy\workspace' for the testing framework 'JUnit'. Did you enter a pattern relative to the correct directory? Did you generate the result report(s) for 'JUnit'? 
[xUnit] [ERROR] - No test reports found for the metric 'JUnit' with the resolved pattern 'C:\Users\20040922\.jenkins\workspace\firstreport.xml'. Configuration error?. 
[xUnit] [INFO] - Setting the build status to FAILURE 
[xUnit] [INFO] - Stopping recording. 
Build step 'Publish xUnit test result report' changed build result to FAILURE 
Finished: FAILURE 

**

+0

你有没有尝试过自己什么?目前这看起来像一个“为我做”的问题,这不适合Stackoverflow的问题指南 – Bojangles

+3

@Bojangles如果我没有尝试过,那么我将如何知道我上面提到的错误?请通过问题并然后评论。 –

+1

请参阅http://stackoverflow.com/questions/15943091/boost-unit-tests-with-xunit-plugin-in-jenkins-do-not-work/15946832#15946832 – mark

回答

4

配置非我们必须使用xunit插件。在模式中,我们可以指定* */*。xml,它将搜索当前作业的工作区文件夹中的文件。

1

我正在使用谷歌测试和JUnit测试结果报告。

要发布它的报告,需要更新已发布的* .xml文件的修改日期。下面的代码是我如何做,它工作在Windows Server

GOOGLE_TEST.exe --gtest_output=xml 
    copy /b test_detail.xml+,, 

在Linux或Mac,您可能需要执行touch test_detail.xml而不是copy /b test_detail.xml(我没有尝试这个)