rebar3_stale
A rebar3 plugin that runs only tests affected by code changes.
Installation
Add the plugin to your rebar.config:
{project_plugins, [rebar3_stale]}.
Usage
Run only stale EUnit tests:
rebar3 stale eunit
Run only stale Common Test suites:
rebar3 stale ct
Force a full test run with --all:
rebar3 stale eunit --all
rebar3 stale ct --all
On the first run (no manifest exists), all tests are executed.
How It Works
- Computes MD5 checksums of all
.erland.hrlfiles - Builds a module dependency graph from compiled
.beamfiles - Compares checksums against the stored manifest to find changed files
- Resolves transitively affected modules
- Filters to test modules (
*_tests/*_testfor EUnit,*_SUITEfor CT) and runs only those
The manifest is stored at _build/test/.rebar3_stale_manifest.
License
MIT