Skip to content

Commit

Permalink
Merge pull request #1714 from nandhu-kumar/develop
Browse files Browse the repository at this point in the history
MOSIP-38489 - Generated single report with 2 sections
  • Loading branch information
mohanachandran-s authored Jan 15, 2025
2 parents 01a6ce0 + 802d807 commit 159714a
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,11 @@ public static int getSkippedCount() {

@Override
public void generateReport(List<XmlSuite> xmlSuites, List<ISuite> suites, String outputDirectory) {
generateReport(xmlSuites, suites, outputDirectory, false); // Generate full report
generateReport(xmlSuites, suites, outputDirectory, true); // Generate error report
generateReport(xmlSuites, suites, outputDirectory, false); // Generate full report
if (totalFailedTests > 0 || totalSkippedTests > 0) {
generateReport(xmlSuites, suites, outputDirectory, true); // Generate error report
}

}

private SuiteResult createFilteredSuiteResult(ISuite suite) {
Expand Down Expand Up @@ -162,6 +165,11 @@ public void generateOutputFile(boolean skipPassed) {
temp = "-" + reportContext + "report_T-" + totalTestCases + "_P-" + totalPassedTests + "_S-" + totalSkippedTests + "_F-"
+ totalFailedTests + "_KI-" + totalKnownIssueTests;
}

if (skipPassed == true) {
temp = temp.replaceAll("P-\\d+_", ""); // Removes passed count (P-*_) from the report title.
}

String newString = oldString.replace("-report", temp);

File orignialReportFile = new File(
Expand Down

0 comments on commit 159714a

Please sign in to comment.