sahumada commented on Improvement JENKINS-8713

Hi,

I've been trying to show my skipped tests without much success. My XML looks like:

<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="tst_XmlPatterns" tests="2" failures="0" errors="0" skipped="1" time="0.000">
   <properties>
      <property name="QtVersion" value="5.2.2"/>
      <property name="QTestVersion" value="5.2.2"/>
   </properties>
   <testcase classname="tst_XmlPatterns" name="initTestCase" time="0.000">
      <skipped>tst_xmlpatterns.cpp:120 :: [] Device &#x9;IP:169.254.0.13&#xA;The command line tool (/usr/lib/qt5/bin/xmlpatterns) could not be run, possibly because Qt was incompletely built or installed. No tests will be run.</skipped>
   </testcase>
   <testcase classname="tst_XmlPatterns" name="cleanupTestCase" time="0.000"/>
   <system-out/>
   <system-err/>
</testsuite>

but it doesn't show anything.

Looking at the source code, I see that you added an attribute called "message", so if I change my XML to

<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="tst_XmlPatterns" tests="2" failures="0" errors="0" skipped="1" time="0.000">
   <properties>
      <property name="QtVersion" value="5.2.2"/>
      <property name="QTestVersion" value="5.2.2"/>
   </properties>
   <testcase classname="tst_XmlPatterns" name="initTestCase" time="0.000">
      <skipped message="tst_xmlpatterns.cpp:120 :: [] Device &#x9;IP:169.254.0.13&#xA;The command line tool (/usr/lib/qt5/bin/xmlpatterns) could not be run, possibly because Qt was incompletely built or installed. No tests will be run."/>
   </testcase>
   <testcase classname="tst_XmlPatterns" name="cleanupTestCase" time="0.000"/>
   <system-out/>
   <system-err/>
</testsuite>

then it fails because the XML is not valid according to junit-4.xsd for the xUnit plugin I am using.

The error from the xUnit plugin I get is:

13:03:18 [xUnit] [INFO] - Starting to record.
13:03:18 [xUnit] [INFO] - Processing Custom Tool
13:03:18 [xUnit] [INFO] - [Custom Tool] - 29 test report file(s) were found with the pattern 'test-results/tst_*.xml' relative to '/var/lib/jenkins/jobs/qt-5-qtxmlpatterns-dev/workspace/ARCH/ARM' for the testing framework 'Custom Tool'.
13:03:18 [xUnit] [ERROR] - The converted file for the result file '/var/lib/jenkins/jobs/qt-5-qtxmlpatterns-dev/workspace/ARCH/ARM/test-results/tst_xmlpatterns.xml' (during conversion process for the metric 'Custom Tool') is not valid. The report file has been skipped.
13:03:18 [xUnit] [INFO] - Failing BUILD because 'set build failed if errors' option is activated.
13:03:18 [xUnit] [INFO] - There are errors when processing test results.
13:03:18 [xUnit] [INFO] - Skipping tests recording.
13:03:18 [xUnit] [INFO] - Stop build.

So, is this change incorrect/incomplete or does junit-4.xsd/xUnit need to be updated ?

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to