Continuously runs your tests to detect flaky tests
Project description
pytest-flake-detection
Continuously runs your tests to detect flaky tests. Will default to a maximum of 99 runs, but can be configured to run indefinitely, or any number you desire.
This pytest plugin was generated with Cookiecutter along with @hackebrot's cookiecutter-pytest-plugin template.
Features
- This is extremely crude as of right now, but it will run your tests a number of times and report any tests which intermittently fail, along with stats on the failures.
- TODO
- Lax mode: if a test passes continuously for the first N runs, it will be considered a pass and not run again. This is useful for tests which are slow to run, but are not flaky.
- Randomised order: tests are run in a random order each time, to help detect flaky tests which are dependent on the order of other tests.
- Playing nice with other plugins: this plugin will not interfere with other plugins which modify the test order, as it will randomise the order after all other plugins have had a chance to modify it.
Requirements
You will need pytest, and some electricity in your computer.
Installation
You can install "pytest-flake-detection" via pip from PyPI:
$ pip install pytest-flake-detection
Usage
$ pytest-flake-detect --max-runs 30 .
If you encounter any problems, please file an issue along with a detailed description.
Cookiecutter
@hackebrot
MIT
BSD-3
GNU GPL v3.0
Apache Software License 2.0
cookiecutter-pytest-plugin
pytest
tox
pip
PyPI
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pytest_flake_detection-0.1.2.tar.gz.
File metadata
- Download URL: pytest_flake_detection-0.1.2.tar.gz
- Upload date:
- Size: 14.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8fdabd7a1bc1e27db7869cceab66fc0211a3c03c60580315a8b0489f6bc70aa8
|
|
| MD5 |
63c792c0d7fbd785ea265fd8edb390c1
|
|
| BLAKE2b-256 |
9b357ce4516e0063974fa15b03cb9f5bafbbf6a479123951b661b7756dc32ced
|
File details
Details for the file pytest_flake_detection-0.1.2-py3-none-any.whl.
File metadata
- Download URL: pytest_flake_detection-0.1.2-py3-none-any.whl
- Upload date:
- Size: 12.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6b6260a8ffd25624072133489aae1fe03fbf61ee6c550be36d57e7d760723405
|
|
| MD5 |
f8b587d0611400b3d0e81f6f590dbfee
|
|
| BLAKE2b-256 |
3a8ec258c62af4761d11e76a387f753ecd8f7362244cbc3b90d31c1b637043db
|