You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2020/11/16 04:00:56 UTC

[GitHub] [maven-surefire] nk-coding opened a new pull request #324: SUREFIRE-1857: JUnit 5 report does not contain assertion failure message

nk-coding opened a new pull request #324:
URL: https://github.com/apache/maven-surefire/pull/324


   Added exception message to report  
   Added IT


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] nk-coding commented on a change in pull request #324: SUREFIRE-1857: JUnit 5 report does not contain assertion failure message

Posted by GitBox <gi...@apache.org>.
nk-coding commented on a change in pull request #324:
URL: https://github.com/apache/maven-surefire/pull/324#discussion_r524498040



##########
File path: surefire-providers/surefire-junit-platform/src/main/java/org/apache/maven/surefire/junitplatform/RunListenerAdapter.java
##########
@@ -124,13 +125,16 @@ public void executionFinished( TestIdentifier testIdentifier, TestExecutionResul
                     }
                     break;
                 case FAILED:
+                    String reason = safeGetMessage( testExecutionResult.getThrowable().orElse( null ) );
                     if ( isAssertionError )
                     {
-                        runListener.testFailed( createReportEntry( testIdentifier, testExecutionResult, elapsed ) );
+                        runListener.testFailed( createReportEntry( testIdentifier, testExecutionResult, 
+                                reason, elapsed ) );
                     }
                     else
                     {
-                        runListener.testError( createReportEntry( testIdentifier, testExecutionResult, elapsed ) );
+                        runListener.testError( createReportEntry( testIdentifier, testExecutionResult, 

Review comment:
       done




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 merged pull request #324: SUREFIRE-1857: JUnit 5 report does not contain assertion failure message

Posted by GitBox <gi...@apache.org>.
Tibor17 merged pull request #324:
URL: https://github.com/apache/maven-surefire/pull/324


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 commented on a change in pull request #324: SUREFIRE-1857: JUnit 5 report does not contain assertion failure message

Posted by GitBox <gi...@apache.org>.
Tibor17 commented on a change in pull request #324:
URL: https://github.com/apache/maven-surefire/pull/324#discussion_r524263465



##########
File path: surefire-providers/surefire-junit-platform/src/main/java/org/apache/maven/surefire/junitplatform/RunListenerAdapter.java
##########
@@ -124,13 +125,16 @@ public void executionFinished( TestIdentifier testIdentifier, TestExecutionResul
                     }
                     break;
                 case FAILED:
+                    String reason = safeGetMessage( testExecutionResult.getThrowable().orElse( null ) );
                     if ( isAssertionError )
                     {
-                        runListener.testFailed( createReportEntry( testIdentifier, testExecutionResult, elapsed ) );
+                        runListener.testFailed( createReportEntry( testIdentifier, testExecutionResult, 
+                                reason, elapsed ) );
                     }
                     else
                     {
-                        runListener.testError( createReportEntry( testIdentifier, testExecutionResult, elapsed ) );
+                        runListener.testError( createReportEntry( testIdentifier, testExecutionResult, 

Review comment:
       The method `createReportEntry( testIdentifier, testExecutionResult, reason, elapsed )` is called twice.
   Maybe you can call it once and move it between the Line 128 and 129.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org