A plugin that executes only the tests with changes in execution path
This Pytest plugin was generated with Cookiecutter along with @hackebrot's Cookiecutter-pytest-plugin template.
- TODO
- TODO
You can install "pytest-skipper" via pip from PyPI:
$ pip install pytest-skipper
$ py.test --trace
This will run the full test suite and record coverage scopes (= name of executed functions)
for each test. The scopes are stored in sqlite database skipper.db
. The git repo may not
have any uncommitted changes when execution trace is recorded.
$ py.test --skipper
This command compares your projects git repo state against traces in scope database and selects the execution trace with least code changes. After this the program calculates all scopes with changes and uses those to select only the tests that have changes in their execution path.
$ py.test --skipper --trace
You can use --trace
and --skipper
arguments at the same time to update the previous
execution trace to the latest version without re-running all the tests. Execution traces are
stored after each test case, so it is possible to terminate this command and continue it later.
$ py.test --dry-run-skipper
Same as --skipper
, but instead of running the tests, only outputs them. Useful to see what
tests need to be updated after code change.
Contributions are very welcome. Tests can be run with tox, please ensure the coverage at least stays the same before you submit a pull request.
Distributed under the terms of the MIT license, "pytest-skipper" is free and open source software
If you encounter any problems, please file an issue along with a detailed description.