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
@@ -82,8 +86,8 @@ var RunTestsCmd = &cobra.Command{
82
86
fmt.Printf("All test results saved to %s\n", outputPath)
83
87
}
84
88
85
-
iflen(failedTests) >0 {
86
-
// Fail if any tests failed
89
+
iflen(flakyTests) >0 {
90
+
// Exit with error code if there are flaky tests
87
91
os.Exit(1)
88
92
} elseiflen(testResults) ==0 {
89
93
fmt.Printf("No tests were run for the specified packages.\n")
@@ -103,6 +107,7 @@ func init() {
103
107
RunTestsCmd.Flags().Float64("threshold", 0.8, "Threshold for considering a test as flaky")
104
108
RunTestsCmd.Flags().StringSlice("skip-tests", nil, "Comma-separated list of test names to skip from running")
105
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