Go Test
| This documentation was generated with the assistance of AI. Please report any inaccuracies. |
Run a Go module’s or workspace’s tests, scoped to whatever the caller asked for, and report a compact pass/fail summary parsed from the go test -json event stream. It is a report-only skill: it never fixes a failing test, modifies source or test code, edits go.mod/go.sum, re-vendors, or starts containers unless asked to as a follow-up.
Purpose
Go projects differ in layout and in how their tests are split. iru-go-test detects the toolchain, tells modules from go.work workspaces (where ./… does not cross module boundaries), respects vendored dependencies (-mod=vendor is automatic, and inconsistent vendoring is reported rather than bypassed with -mod=mod), and decides whether the race detector can run. It separates fast, container-free tests from container-backed ones behind the integration build tag, runs exactly the requested selection with -count=1 so cached results are never reported as a fresh run, and parses the event stream with an embedded stdlib Python parser. Only leaf subtests are counted and listed, in-process testscript failures are reported by their FAIL: <script>.txtar:<line> line, and build failures, package-level failures (timeouts, TestMain) and packages with no test files are reported separately and plainly, never as "0 tests".
For a Bubble Tea project it also applies the catalog’s UI contract (see Building user interfaces): the project’s UI tests are ordinary in-process tests that write the stripped view as .txt into .ui-screenshots/, so Step 4a only prepares the directory (UI_SCREENSHOTS_DIR, default <repo root>/.ui-screenshots, prefixed onto the go test/gotestsum command), clears it only on a full unscoped run, reads the accessibility level from .ui-quality.yml (none or off means the checks are not applicable and are reported as "accessibility: opted out" or "accessibility checks off", never unverified or failed), and afterwards validates capture names and counts captures and accessibility rule ids with an embedded stdlib Python script. No lock is needed.
== Purpose group
Plugin
Shipped by the iru-go plugin of the ai-catalog marketplace (install with /plugin install iru-go@ai-catalog; see Plugins).
Invocation
/iru-go-test
/iru-go-test <package patterns>
Optional key: value lines may follow the package patterns.
Inputs
| Argument | Required | Description | Default |
|---|---|---|---|
|
No |
Space- or comma-separated patterns such as |
|
|
No |
Passed as |
Not set — all tests. |
|
No |
Passed as |
Not set. |
|
No |
Passed as |
Not set — the fast, container-free selection. |
|
No |
Whether to run with the race detector. |
|
|
No |
Write |
|
|
No |
Whether to apply Step 4a (terminal-UI captures, |
|
|
No |
A line passed by a calling skill that already holds |
Not set — the skill takes the lock itself for container-backed runs. |
Outputs
-
A plain-text summary in the conversation: the Go version, module and scope, flags used (
-race,-count=1, fast or integration selection), counts of packages, tests, passed, failed and skipped, and for each failing leaf test<package>.<Test/sub>with the first line of its message. -
Build failures (
[build failed],[setup failed]) and package-level failures outside any test (timeouts,TestMain,os.Exit) listed separately; packages with no test files summarized in one line. -
A run that matched nothing is reported as "no test files" or "`run:` matched no test", and a missing race detector or gotestsum is said plainly.
-
An integration run that could not happen is reported as unverified (Docker unavailable, blocked by a concurrent run), never as passed or as failed tests; environment failures such as an unreachable Docker daemon are classified as such.
-
Wiring problems (inconsistent vendoring, missing
go.sumentry, toolchain too old) are named as such, never papered over. -
For a terminal-UI project (Step 4a): the capture directory and whether it was cleared (full run) or kept (scoped run), captures per kind (
component/screen/flow), malformed names (count + first few paths), accessibility violations as counts per rule id (from failing tests underenforce, froma11y-report.txtunderreport) and the.ui-quality.ymllevel applied. Terminal UIs have no automated accessibility audit; the checks are the assertedtui-color-only,tui-help-lineandtui-keyboardones, and the report says so. -
build/test-results/go-test.json(andgo-test.xmlwithjunit: yes), kept whenbuild/is gitignored. -
No source or test code is ever modified.
Execution flow
Dependencies
Invokes
None — iru-go-test is a leaf skill; it only runs go, optional gotestsum, a stdlib Python parser and the lock commands, and reports on their output.
Invoked by
-
Go Code One Task Group — scoped tests per bucket, the full fast suite with the race detector (with
ui: yesfor a terminal-UI project, as the full UI run that clears and refills.ui-screenshots/), and the container-backed run (tags: integrationwithlock: held), via theiru-gate-runneragent.
Its flag handling, toolchain detection and Step 6 event parsing are also reused by Go Coverage, and its module and workspace layout rules by Go Code Quality.
Related agents
-
iru-gate-runner— calling skills normally run it inside this sub-agent. It spawns no agents itself.
Source
SKILL.md on GitHub — the file this page was generated from.