Skip to content

Troubleshooting

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.

Terminal window
trimtest explain tests/test_core.py

prints 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.

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.

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.

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).

Terminal window
trimtest check

Errors name the file and the key. Unknown keys are errors, and top-level keys must come before the first [table].

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.

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.