You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Praveen Sreepada (Jira)" <ji...@apache.org> on 2022/10/06 12:18:00 UTC

[jira] [Commented] (SUREFIRE-2118) surefire-report xml format not compliant with xsi for test failing in all of the re-runs

    [ https://issues.apache.org/jira/browse/SUREFIRE-2118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17613483#comment-17613483 ] 

Praveen Sreepada commented on SUREFIRE-2118:
--------------------------------------------

junit-plugin in jenkins expects <system-out> element to be present under <testcase>. This element is parsed and displayed as stack trace for any failing test case. Since this element is missing, junit displays nothing in the stack trace.

Was there a recent change to how and where <system-out> is put in the xml hierarchy?

With Version M5, everything was working fine, we started seeing empty stack traces in M6 and M7

> surefire-report xml format not compliant with xsi for test failing in all of the re-runs
> ----------------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-2118
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-2118
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: Junit 4.7+ (parallel) support, Maven Surefire Plugin, xml generation
>    Affects Versions: 3.0.0-M7
>            Reporter: Yamini
>            Priority: Major
>
> We expect the format of surefire .xml report for test failing in all rerun to be as mentioned in [https://maven.apache.org/surefire/maven-surefire-plugin/examples/rerun-failing-tests.html#:~:text=2)-,The%20test%20fails%20in%20all%20of%20the%20re%2Druns%3A,-failure%20and%20error] 
> But, I can see the following format for my run 
> rerunFailingTestsCount = 2
> {code:java}
> <testcase name=".." classname=".." time="0.1">  
>     <failure type=""> first failure stack trace </failure>  
>     <rerunFailure type="assertion exception">    
>         <stackTrace>rerun failure stack trace</stackTrace> 
>     </rerunFailure>
>     <rerunFailure type="assertion exception"> 
>         <stackTrace>rerun failure stack trace</stackTrace> 
>         <system-out> rerun failure </system-out> 
>     </rerunFailure>
> </testcase> {code}
> we have only one <system-out> in last rerunFailure. <system-out> is missing under <testcase> and first <rerunFailure>
>  
> surefire-plugin
> {code:java}
>          <plugin>
>                 <groupId>org.apache.maven.plugins</groupId>
>                 <artifactId>maven-surefire-plugin</artifactId>
>                 <version>3.0.0-M7</version>
>                 <dependencies>
>                     <dependency>
>                         <groupId>org.apache.maven.surefire</groupId>
>                         <artifactId>surefire-junit47</artifactId>
>                         <version>3.0.0-M7</version>
>                     </dependency>
>                 </dependencies>
>                 <configuration>
>                     <systemPropertyVariables>
>  <sun.net.http.allowRestrictedHeaders>true</sun.net.http.allowRestrictedHeaders>
>                     </systemPropertyVariables>
>                     <parallel>all</parallel>
>                     <threadCount>4</threadCount>
>                     <forkCount>1C</forkCount>
>                     <groups>${tests.groups}</groups>
>                     <rerunFailingTestsCount>2</rerunFailingTestsCount>
>                 </configuration>
>             </plugin> {code}
>  
> Why is it not compliant? Can the issue be fixed? 
> Please let me know if you need any more information.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)