You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2024/06/26 21:25:59 UTC

(maven-surefire) 01/01: [SUREFIRE-2242] Plain test report does not include names of the skipped tests

This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch SUREFIRE-2242
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git

commit 18f3f2c1d674b7477da67d516282da316c641084
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Wed Jun 26 23:25:22 2024 +0200

    [SUREFIRE-2242] Plain test report does not include names of the skipped tests
    
    This closes #752
---
 .../java/org/apache/maven/plugin/surefire/report/TestSetStats.java    | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/TestSetStats.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/TestSetStats.java
index 96b4fb451..1a69fc332 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/TestSetStats.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/TestSetStats.java
@@ -227,7 +227,9 @@ public class TestSetStats {
             if (testResult.isErrorOrFailure()) {
                 result.add(testResult.getOutput(trimStackTrace));
             } else if (plainFormat && testResult.isSkipped()) {
-                result.add(testResult.getSourceName() + " skipped");
+                String description =
+                        testResult.getName() == null ? testResult.getSourceName() : testResult.getClassMethodName();
+                result.add(description + " skipped");
             } else if (plainFormat && testResult.isSucceeded()) {
                 result.add(testResult.getElapsedTimeSummary());
             }