Skip to content

Commit

Permalink
Bypass summary printing if any of the group if pass-fail
Browse files Browse the repository at this point in the history
  • Loading branch information
siddharthkoli committed Dec 21, 2024
1 parent 6f13f24 commit 0a3f2ad
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions pkg/reporter/stdout_reporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ func PrintSingleGroupStdout(groupReport map[string][]Report) error {
totalSuccessCount += stdoutReport.Summary.Passed
totalFailureCount += stdoutReport.Summary.Failed
fmt.Println(stdoutReport.Text)
fmt.Printf("Summary: %d succeeded, %d failed\n\n", stdoutReport.Summary.Passed, stdoutReport.Summary.Failed)
if group != "Passed" && group != "Failed" {
fmt.Printf("Summary: %d succeeded, %d failed\n\n", stdoutReport.Summary.Passed, stdoutReport.Summary.Failed)
}
}

fmt.Printf("Total Summary: %d succeeded, %d failed\n", totalSuccessCount, totalFailureCount)
Expand All @@ -70,7 +72,9 @@ func PrintDoubleGroupStdout(groupReport map[string]map[string][]Report) error {
totalSuccessCount += stdoutReport.Summary.Passed
totalFailureCount += stdoutReport.Summary.Failed
fmt.Println(stdoutReport.Text)
fmt.Printf(" Summary: %d succeeded, %d failed\n\n", stdoutReport.Summary.Passed, stdoutReport.Summary.Failed)
if group != "Passed" && group != "Failed" && group2 != "Passed" && group2 != "Failed" {
fmt.Printf(" Summary: %d succeeded, %d failed\n\n", stdoutReport.Summary.Passed, stdoutReport.Summary.Failed)
}
}
}

Expand All @@ -94,7 +98,9 @@ func PrintTripleGroupStdout(groupReport map[string]map[string]map[string][]Repor
totalSuccessCount += stdoutReport.Summary.Passed
totalFailureCount += stdoutReport.Summary.Failed
fmt.Println(stdoutReport.Text)
fmt.Printf(" Summary: %d succeeded, %d failed\n\n", stdoutReport.Summary.Passed, stdoutReport.Summary.Failed)
if groupOne != "Passed" && groupOne != "Failed" && groupTwo != "Passed" && groupTwo != "Failed" && groupThree != "Passed" && groupThree != "Failed" {
fmt.Printf(" Summary: %d succeeded, %d failed\n\n", stdoutReport.Summary.Passed, stdoutReport.Summary.Failed)
}
}
}
}
Expand Down

0 comments on commit 0a3f2ad

Please sign in to comment.