[JIRA] (JENKINS-51919) jUnit output of PHPUnit test fail to parse

2 views
Skip to first unread message

larsskj@java.net (JIRA)

unread,
Jun 13, 2018, 9:33:12 AM6/13/18
to jenkinsc...@googlegroups.com
larsskj created an issue
 
Jenkins / Bug JENKINS-51919
jUnit output of PHPUnit test fail to parse
Issue Type: Bug Bug
Assignee: Nikolas Falco
Components: xunit-plugin
Created: 2018-06-13 13:32
Environment: Jenkins 2.127
xUnit plugin 2.0.2
Priority: Major Major
Reporter: larsskj

Job log show lots of error lines starting like:
INFO: [JUnit] - 2 test report file(s) were found with the pattern 'phpunit-result.xml, selenium.xml' relative to '/var/lib/jenkins/workspace/bob-develop' for the testing framework 'JUnit'.
WARNING: The file '/var/lib/jenkins/workspace/bob-develop/phpunit-result.xml' is an invalid file.
WARNING: At line 3 of file:/var/lib/jenkins/workspace/bob-develop/phpunit-result.xml:cvc-complex-type.3.2.2: Attribute 'assertions' is not allowed to appear in element 'testsuite'.
I can supply a full XML file if needed.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

larsskj@java.net (JIRA)

unread,
Jun 13, 2018, 9:36:02 AM6/13/18
to jenkinsc...@googlegroups.com
larsskj updated an issue
Change By: larsskj
Job log show lots of error lines starting like:
{code:java}
INFO: [JUnit] - 2 test report file(s) were found with the pattern 'phpunit-result.xml, selenium.xml' relative to '/var/lib/jenkins/workspace/bob-develop' for the testing framework 'JUnit'.
WARNING: The file '/var/lib/jenkins/workspace/bob-develop/phpunit-result.xml' is an invalid file.
WARNING: At line 3 of file:/var/lib/jenkins/workspace/bob-develop/phpunit-result.xml:cvc-complex-type.3.2.2: Attribute 'assertions' is not allowed to appear in element 'testsuite'.
 
{code}
I can supply a full XML file if needed.

nfalco79@hotmail.com (JIRA)

unread,
Jun 13, 2018, 12:40:02 PM6/13/18
to jenkinsc...@googlegroups.com
Nikolas Falco commented on Bug JENKINS-51919
 
Re: jUnit output of PHPUnit test fail to parse

assertions is not a valid attribute of supported JUnit XML report.

nfalco79@hotmail.com (JIRA)

unread,
Jun 13, 2018, 1:06:02 PM6/13/18
to jenkinsc...@googlegroups.com
Nikolas Falco updated an issue
 
Change By: Nikolas Falco
Comment:
assertions is not a valid attribute of supported JUnit XML report.

nfalco79@hotmail.com (JIRA)

unread,
Jun 13, 2018, 1:08:03 PM6/13/18
to jenkinsc...@googlegroups.com
Nikolas Falco closed an issue as Not A Defect
 

Assertions is not a valid attribute for the testsuite element of supported JUnit report.
The managed scenarios are errors, failure and skipped What assertions means?

If you would support the custom junit format for phpunit test please select the "Custom Tool" as test type and provide an XSL to conver the generated report to a correct format of the supported JUnit format. In the "custom stylesheet" value you could insert the path of your XSL file that could be absolute on the server (master) or relative to the workspace.

Change By: Nikolas Falco
Status: Open Closed
Resolution: Not A Defect

nfalco79@hotmail.com (JIRA)

unread,
Jun 13, 2018, 1:27:01 PM6/13/18
to jenkinsc...@googlegroups.com
 
Re: jUnit output of PHPUnit test fail to parse

Consider to use the internal PHPUnit support instead of leave PHP to produce a compatible report.

larsskj@java.net (JIRA)

unread,
Jun 14, 2018, 3:56:02 AM6/14/18
to jenkinsc...@googlegroups.com
larsskj commented on Bug JENKINS-51919

It did work with xUnit 1.X though. I think you should provide a very clear warning when you break backwards compatibility - and provide a way to keep the old version until we've had a chance to resolve the issue. The 1.X -> 2.X upgrade has broken a lot of existing functionality.

nfalco79@hotmail.com (JIRA)

unread,
Jun 16, 2018, 2:00:02 AM6/16/18
to jenkinsc...@googlegroups.com

As you suggest I mark the plugin to show a warning since version 2.0 and a clear message in the wiki page.

captainhypertext@gmail.com (JIRA)

unread,
May 21, 2019, 12:36:02 PM5/21/19
to jenkinsc...@googlegroups.com

Yeah, this issue completely butchered my unit test parsing.  I switched to the PHPUnit-X parser and it worked pretty well, still using JUnit output.

This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)
Reply all
Reply to author
Forward
0 new messages