2

i want to publish test report which is in xml format generated through google cpp test tool in jenkins through xunit plugin. while configuring plugin we have to specify pattern.Can anyone pls help what to write in this pattern because if i configure any it gives this error

**

[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

**

Jasdeep Singh Arora
  • 543
  • 2
  • 11
  • 31
  • Have you tried anything yourself? Currently this looks like a "do it for me" question, which does not fit Stackoverflow's question guidelines – Bojangles Apr 15 '13 at 06:20
  • 4
    @Bojangles if i had not tried then how would i came to know about the error which i have mentioned above ?Please go through the question and then comment . – Jasdeep Singh Arora Apr 15 '13 at 06:25
  • 1
    see http://stackoverflow.com/questions/15943091/boost-unit-tests-with-xunit-plugin-in-jenkins-do-not-work/15946832#15946832 – mark Apr 15 '13 at 07:33

2 Answers2

4

for configuring non java tool we have to use xunit plugin.In the Pattern we can specify **/*.xml which will search for the file in workspace folder of current job.

Jasdeep Singh Arora
  • 543
  • 2
  • 11
  • 31
1

I'm using google test and JUnit test result report.

To publish it's report, the published *.xml file's modified date need to be updated. The code below is how I did and it works on Windows Server

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

In Linux or Mac, you may need to execute touch test_detail.xml instead of copy /b test_detail.xml (I didn't try this)

Joon Hong
  • 1,337
  • 15
  • 23