Skip to content

Commit

Permalink
[SUREFIRE-2242] Plain test report does not include names of the skipp…
Browse files Browse the repository at this point in the history
…ed tests

This closes #752
  • Loading branch information
michael-o committed Jun 27, 2024
1 parent 3a793bb commit 6ff0f83
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ public List<String> getTestResults() {
if (testResult.isErrorOrFailure()) {
result.add(testResult.getOutput(trimStackTrace));
} else if (plainFormat && testResult.isSkipped()) {
result.add(testResult.getSourceName() + " skipped");
result.add(testResult.getFullName() + " skipped");
} else if (plainFormat && testResult.isSucceeded()) {
result.add(testResult.getElapsedTimeSummary());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ public String getClassMethodName() {
return original.getSourceName() + "." + original.getName();
}

public String getFullName() {
return getName() == null ? getSourceName() : getClassMethodName();
}

@Override
public String getGroup() {
return original.getGroup();
Expand Down Expand Up @@ -186,8 +190,7 @@ public String getElapsedTimeVerbose() {
}

public String getElapsedTimeSummary() {
String description = getName() == null ? getSourceName() : getClassMethodName();
return description + " -- " + getElapsedTimeVerbose();
return getFullName() + " -- " + getElapsedTimeVerbose();
}

public boolean isErrorOrFailure() {
Expand Down

0 comments on commit 6ff0f83

Please sign in to comment.