[JIRA] (JENKINS-59064) xUnit plugin fails to parse JUnit XML generated by trx2junit

0 views
Skip to first unread message

jenkins.io@ohrt.info (JIRA)

unread,
Aug 23, 2019, 8:55:03 AM8/23/19
to jenkinsc...@googlegroups.com
Not Diff created an issue
 
Jenkins / Bug JENKINS-59064
xUnit plugin fails to parse JUnit XML generated by trx2junit
Issue Type: Bug Bug
Assignee: Nikolas Falco
Components: xunit-plugin
Created: 2019-08-23 12:54
Priority: Minor Minor
Reporter: Not Diff

I use https://github.com/gfoidl/trx2junit to convert TRX result files to JUnit (because the https://plugins.jenkins.io/junit plugin is so horribly memory-inefficient), however, xUnit does not accept its output:

Value '0.4798998' is not facet-valid with respect to pattern '(([0-9]{0,3},)[0-9]{3}|[0-9]{0,3})(\.[0-9]{0,3})?' for type 'SUREFIRE_TIME'.

Simply accepting 7 (or even 8) decimal digits instead of 3 should fix the problem.

 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

nfalco79@hotmail.com (JIRA)

unread,
Aug 23, 2019, 9:00:04 AM8/23/19
to jenkinsc...@googlegroups.com
Nikolas Falco closed an issue as Not A Defect
 

xUnit use JUnit plugin under the wood. So this does not resolve your initial issue.

Anyway as documented in Wiki page xUnit only support two junit schema (maven surefire/ant). Both schema declare time with 3 decimals.

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

nfalco79@hotmail.com (JIRA)

unread,
Aug 23, 2019, 9:03:04 AM8/23/19
to jenkinsc...@googlegroups.com
Nikolas Falco commented on Bug JENKINS-59064
 
Re: xUnit plugin fails to parse JUnit XML generated by trx2junit

xUnit should already support MSTest report type. Try to use internal feature

jenkins.io@ohrt.info (JIRA)

unread,
Aug 23, 2019, 2:34:01 PM8/23/19
to jenkinsc...@googlegroups.com
Not Diff commented on Bug JENKINS-59064

Sorry, I meant https://plugins.jenkins.io/mstest is terribly memory-inefficient. I want to avoid it and since it also used by xUnit, I am using the workaround via trx2junit.

Thanks for pointing me to the junit surefire schema: https://maven.apache.org/surefire/maven-surefire-plugin/xsd/surefire-test-report.xsd

So it is trx2junit which needs to fix its output.

< /td>

nfalco79@hotmail.com (JIRA)

unread,
Aug 24, 2019, 9:58:01 AM8/24/19
to jenkinsc...@googlegroups.com

it's a trx2junit issue. It declare to create a junit output but there is not a defined standard so anyone can produce what they want. This is the main reason starting from version 2.0 I had restrict to the main two used common schema.

As I told the do not need trx2junit at all because xUnit (like MSTest Plugin) should already support trx files. You simply need to choose MSTest report type instead of JUnit and in files use a pattern like this: */.trx

Reply all
Reply to author
Forward
0 new messages