Skip to content

Quick start

Terminal window
cd your-repo
trimtest init # writes a commented trimtest.toml and adds .trimtest/ to .gitignore
trimtest detect # which projects were found, and how many tests each tracks
trimtest record --coverage # run the suite once and learn what each test executes

record --coverage runs every test file on its own under the ecosystem’s coverage tool (see the requirements). Use trimtest record --run for the static tier only: it runs everything once and records the baseline only if the run is green.

Now change some code:

Terminal window
trimtest select # which tests that change reaches, and why
trimtest run # run just those with each project's native runner
trimtest explain tests/test_core.py # why a test was, or was not, selected

select diffs the working tree against the recorded baseline, so uncommitted edits work. Its output names the reason for every selected test:

pytest: 1 of 1 tests selected
tests/test_a.py [test changed]

In a pull request you do not need a recording at all. Compare against the base branch:

Terminal window
trimtest run --base origin/main

See GitHub Actions for a complete workflow, and keep a scheduled full run (trimtest run --full) as the safety net.