Detect flaky test by running a test multiple times
Preconditions (2)
Step 1: Create a test method that runs the flaky test 5 times
Step 2: In each run, execute the flaky test logic
Step 3: Record if the test passes or fails each time
Step 4: After all runs, check if there were both passes and failures
Step 5: If yes, mark the test as flaky
✅ Expected Result: The test detects if the flaky test passes sometimes and fails sometimes, indicating flakiness