Framework Mode - Flaky test detection and retry
Folder Structure
tests/ ├── test_login.py ├── test_checkout.py ├── test_profile.py conftest.py pytest.ini utils/ ├── retry_helper.py ├── flaky_detector.py reports/ └── latest_report.html
tests/ ├── test_login.py ├── test_checkout.py ├── test_profile.py conftest.py pytest.ini utils/ ├── retry_helper.py ├── flaky_detector.py reports/ └── latest_report.html
tests/ folder, e.g., test_login.py. These contain test functions using pytest.conftest.py for setup, teardown, and retry hooks.retry_helper.py to implement retry logic and flaky_detector.py to log flaky test info.pytest.ini to configure pytest plugins and retry options.reports/ folder for review.[pytest] addopts = --reruns 2 --reruns-delay 1This retries failed tests up to 2 times with 1 second delay.
.env files to toggle flaky detection on/off without code changes.conftest.py to detect flaky tests by tracking retries and logging flaky occurrences.reports/ folder for easy access and historical comparison.Where in this folder structure would you add a new utility function to log flaky test occurrences during retries?