run-unit-testslisted
Install: claude install-skill vsdudakov/troika
# Run unit tests (changed only, parallel)
First test execution: change-related tests only, parallel by area.
**Kind** procedure · **Used by** [tester](../../agents/tester.md) · **When** internal review is `Approve` / `Approve with nits`, before QA (develop-flow step 5) · **Ends with** a test report file, a `Pass`/`Fail` verdict, and failures routed to the owning dev role
Read-only. Owner fixes failures. Set `TROIKA_WORKSPACE`.
<a id="selection"></a>
## 1. Select the tests — from the diff, not from the tree
Read `ls $TROIKA_MEMORY/*.md` first — there is no index file ([memory](../memory/SKILL.md)). Entries about swallowed crashes, zero-collection passes, and suites that only fail in parallel are written by this role, for this role.
Per worktree, use profile `<BASE>`. Intent-to-add exposes untracked files:
```bash
BASE=<remote>/<default-branch> # PROFILE.md › Branches
cd "$TROIKA_WORKTREES/<worktree>"
git fetch "${BASE%%/*}"
git add -N -- .
git --no-pager diff --name-only "$BASE"...HEAD
git --no-pager diff --name-only
```
Run only:
1. **Test files in the diff** — every test file added or modified. Always run.
2. **The mirror test of every changed source file** — the profile fixes where a source file's test lives (PROFILE.md › Tests (`#tests`)); resolve each changed source to that path and run it if it exists. A changed source with no mirror test is a review defect, not a selection problem: report it and hand it back.
3. **Tests directly tied to a changed symbol*