Troubleshooting
Everything runs when I changed one file
Section titled “Everything runs when I changed one file”That is deliberate when trimtest cannot trace the change. Run trimtest select and read the reason. The usual
causes: no baseline yet, a lockfile or build config changed, a deleted file nothing depends on, or --strict. See
Safety rules.
record --run says “tests failed; baseline not recorded”
Section titled “record --run says “tests failed; baseline not recorded””record --run only records a baseline from a green run. Fix the failing tests, or use record --coverage --lenient
to tolerate units that cannot be measured.
A test I expected is not selected
Section titled “A test I expected is not selected”trimtest explain tests/test_core.pyprints every reason and the evidence tier, or says why nothing selected it. If a dependency is invisible to the
import graph (reflection, string-based imports), record coverage so it is measured: trimtest record --coverage.
For suites with no import link at all, add a [map] entry.
My recording is ignored
Section titled “My recording is ignored”A recording is ignored, and the test uses the static graph, when the test file changed since it was made, when the
coverage tool version changed, or when you compare against another --base (a warning says so). Re-record with
trimtest record --coverage.
Exit code 3
Section titled “Exit code 3”Selection is uncertain: a selected test cannot be run by the runner. Run the full suite (trimtest run --full)
and check which test was skipped in the warning above the summary. trimtest select --exit-code also exits 3
when nothing is selected but a changed file is not known to affect any test.
The baseline looks old
Section titled “The baseline looks old”trimtest warns when the recorded baseline is far behind HEAD. Re-baseline with trimtest record --update-if-green
(runs the affected tests and re-records only if they pass).
Validate the config
Section titled “Validate the config”trimtest checkErrors name the file and the key. Unknown keys are errors, and top-level keys must come before the first [table].
Gradle runs stale classes
Section titled “Gradle runs stale classes”trimtest already passes -Dorg.gradle.vfs.watch=false. If you run Gradle yourself right after an edit and tests pass
when they should fail, that is Gradle’s file watcher; see Java and Kotlin.
Windows
Section titled “Windows”Supported natively; see the Windows guide. Common problems: a .cmd shim rejecting
an argument, paths over 260 characters (git config --system core.longpaths true), or antivirus locking
.trimtest\map.json. WSL also works and behaves like Linux.