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
Metadata
Release files for pytest-flake-detection 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pytest_flake_detection-0.1.2.tar.gz | 14.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pytest_flake_detection-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 26.5 kB
Release files / pytest_flake_detection-0.1.2.tar.gz
| Download URL | pytest_flake_detection-0.1.2.tar.gz |
|---|---|
| Size | 14.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8fdabd7a1bc1e27db7869cceab66fc0211a3c03c60580315a8b0489f6bc70aa8
|
|
BLAKE2b-256 checksum How to use checksums |
9b357ce4516e0063974fa15b03cb9f5bafbbf6a479123951b661b7756dc32ced
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Release files / pytest_flake_detection-0.1.2-py3-none-any.whl
| Download URL | pytest_flake_detection-0.1.2-py3-none-any.whl |
|---|---|
| Size | 12.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6b6260a8ffd25624072133489aae1fe03fbf61ee6c550be36d57e7d760723405
|
|
BLAKE2b-256 checksum How to use checksums |
3a8ec258c62af4761d11e76a387f753ecd8f7362244cbc3b90d31c1b637043db
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|