You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AggregateFailedCmd.Flags().Float64("min-pass-ratio", 0.001, "Minimum pass ratio for considering a test as flaky. Used to distinguish between tests that are truly flaky (with inconsistent results) and those that are consistently failing.")
@@ -83,8 +86,8 @@ var RunTestsCmd = &cobra.Command{
83
86
fmt.Printf("All test results saved to %s\n", outputPath)
84
87
}
85
88
86
-
iflen(failedTests) >0 {
87
-
// Fail if any tests failed
89
+
iflen(flakyTests) >0 {
90
+
// Exit with error code if there are flaky tests
88
91
os.Exit(1)
89
92
} elseiflen(testResults) ==0 {
90
93
fmt.Printf("No tests were run for the specified packages.\n")
@@ -104,6 +107,7 @@ func init() {
104
107
RunTestsCmd.Flags().Float64("threshold", 0.8, "Threshold for considering a test as flaky")
105
108
RunTestsCmd.Flags().StringSlice("skip-tests", nil, "Comma-separated list of test names to skip from running")
106
109
RunTestsCmd.Flags().Bool("print-failed-tests", true, "Print failed test results to the console")
110
+
RunTestsCmd.Flags().Float64("min-pass-ratio", 0.001, "Minimum pass ratio for considering a test as flaky. Used to distinguish between tests that are truly flaky (with inconsistent results) and those that are consistently failing.")
0 commit comments