Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytest_flake_detection-0.1.2.tar.gz (14.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytest_flake_detection-0.1.2-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

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

Hashes for pytest_flake_detection-0.1.2.tar.gz
Algorithm Hash digest
SHA256 8fdabd7a1bc1e27db7869cceab66fc0211a3c03c60580315a8b0489f6bc70aa8
MD5 63c792c0d7fbd785ea265fd8edb390c1
BLAKE2b-256 9b357ce4516e0063974fa15b03cb9f5bafbbf6a479123951b661b7756dc32ced

See more details on using hashes here.

File details

Details for the file pytest_flake_detection-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for pytest_flake_detection-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6b6260a8ffd25624072133489aae1fe03fbf61ee6c550be36d57e7d760723405
MD5 f8b587d0611400b3d0e81f6f590dbfee
BLAKE2b-256 3a8ec258c62af4761d11e76a387f753ecd8f7362244cbc3b90d31c1b637043db

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page