Windows
trimtest runs natively on Windows 10 and 11, x86_64 and arm64. Windows is supported alongside Linux and macOS: the
test suite runs on Windows in CI on every push, and the soundness bench has been run there (9 repositories, 10 mutations each) with
no misses observed (bench/RESULTS.md in the repository). WSL also works and behaves exactly like Linux.
Install
Section titled “Install”# prebuilt binary: verifies the checksum, installs to %LOCALAPPDATA%\trimtest\bin and adds it to your PATHirm https://raw.githubusercontent.com/RabinApps/trimtest/main/install.ps1 | iex# $env:TRIMTEST_VERSION = "v0.1.0" pins a release; $env:TRIMTEST_INSTALL_DIR changes the target
cargo install trimtest # from crates.io (needs the Rust toolchain and MSVC build tools)cargo binstall trimtest # prebuilt, if you use cargo-binstallscoop install trimtest # once the Scoop bucket is publishedwinget install RabinApps.trimtest # once the winget package is publishedThe zip archives and checksums are also on the releases page.
Open a new terminal after installing so the updated PATH is picked up. PowerShell, cmd.exe and Git Bash all work.
What trimtest does differently on Windows
Section titled “What trimtest does differently on Windows”- Runners that are
.cmdor.batfiles.npx,pnpm,yarn,mvn,gradle,flutteranddartare batch shims on Windows. trimtest looks programs up onPATHwithPATHEXT, so these work without any configuration../gradlewand./mvnwresolve togradlew.batandmvnw.cmdin the project. A project with only the.bator.cmdwrapper is detected as having a wrapper. - Python.
python3is not normally present on Windows. trimtest uses the first ofpython3,pythonandpythat actually runs (it skips the Microsoft Store stub that merely opens the Store). To force one, set[runner] python = "py -3 -m"or a path intrimtest.toml. - Paths. Repository paths inside trimtest are always
/-separated, whatever the OS. Reports from coverage tools (C:\repo\a.py,file:///C:/repo/a.js, UNC paths,\\?\prefixes, a different drive-letter case) are mapped back to the same repo-relative file. Backslashes intrimtest.tomlpaths and intsconfig.json,package.json,go.workandpubspec.yamlare accepted. - Line endings. A checkout with
core.autocrlf=true(CRLF) selects exactly what an LF checkout does: line endings are normalised before files are fingerprinted, so a map recorded on one machine is valid on the other. - Timeouts.
--timeoutand--total-timeoutkill the whole process tree using a Windows Job Object, so a hung runner’s children go with it.
Things to know
Section titled “Things to know”- Long paths. Deep
node_modulesortargettrees can exceed 260 characters. Enable them once:git config --system core.longpaths true, and turn on Windows long path support (registry keyLongPathsEnabled, or Group Policy). - Antivirus and indexers. Real-time scanners can briefly lock
.trimtest\map.json. trimtest retries the write for about a second; exclude.trimtest\from scanning if you still see failures. - Symlinks and junctions. Not required. You do not need Developer Mode.
- Arguments through
.cmdshims. Windows batch files re-parse their arguments. trimtest passes test names through the shim unchanged, but a test path containing%,^or"can be rejected by Windows itself; rename the test file in that case. - Gradle and captured output. Gradle’s background daemon inherits the pipe a program’s output is captured
through and keeps it open after trimtest has finished. Anything that waits for the pipe to close (a script that
reads trimtest’s output to the end, or
trimtest run | tee log) can then appear to hang. Rungradle --stopafterwards, or setorg.gradle.daemon=falseingradle.propertiesfor CI. Plain terminal use and GitHub Actions steps are not affected. - Untested toolchains. Swift on Windows, Flutter/Dart and Zig have not been run on Windows. They use the same resolution rules and should work, but are not verified.
GitHub Actions on Windows
Section titled “GitHub Actions on Windows”jobs: test: runs-on: windows-latest steps: - uses: actions/checkout@v6 with: { fetch-depth: 0 } - name: Install trimtest run: irm https://raw.githubusercontent.com/RabinApps/trimtest/main/install.ps1 | iex # ...your toolchain setup here... - run: trimtest run --base origin/${{ github.base_ref }} --timeout 900install.ps1 adds trimtest to the PATH of the current step, so later lines in the same step can call it; use
echo "$env:LOCALAPPDATA\trimtest\bin" >> $env:GITHUB_PATH to make it available to later steps.