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
Copy file name to clipboardExpand all lines: README.md
+6-1Lines changed: 6 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,6 +51,11 @@ RSpec.configure do |config|
51
51
ex.run_with_retry retry:3
52
52
end
53
53
54
+
# callback to be run when a flaky test is detected
55
+
config.flaky_test_callback =procdo |example|
56
+
Rspec::Watchdog::Reporter.report(example)
57
+
end
58
+
54
59
# callback to be run between retries
55
60
config.retry_callback =procdo |ex|
56
61
# run some additional clean up task - can be filtered by example metadata
@@ -90,7 +95,7 @@ You can call `ex.run_with_retry(opts)` on an individual example.
90
95
-__:exceptions_to_hard_fail__(default: *[]*) List of exceptions that will trigger an immediate test failure without retry. Takes precedence over __:exceptions_to_retry__
91
96
-__:exceptions_to_retry__(default: *[]*) List of exceptions that will trigger a retry (when empty, all exceptions will)
92
97
-__:retry_callback__(default: *nil*) Callback function to be called between retries
93
-
98
+
-__:flaky_test_callback__(default: *nil*) Callback function to be called when a flaky test is detected (when a test fails but then passes on a subsequent attempt)p
94
99
95
100
## Environment Variables
96
101
-__RSPEC_RETRY_RETRY_COUNT__ can override the retry counts even if a retry count is set in an example or default_retry_count is set in a configuration.
0 commit comments