Skip to content
Development
Skill

/test

Run Unity Test Runner operations asynchronously

From plugin
unity-skills
1.9k83 skills4 commands

Claude Code

$ npx -y skills add Besty0728/Unity-Skills --skill test --agent claude-code

SKILL.md

test.SKILL.md
name: unity-test
description: Run Unity Test Runner operations asynchronously

Unity Test Skills

Run and manage Unity Test Runner tests. Parameters come from the schema (`GET /skills/schema?names=<skill>&wire=v2`); execution and dryRun rules: root [SKILL.md](../../SKILL.md).

When to use

  • Running EditMode or PlayMode tests
  • Discovering or listing tests
  • Polling asynchronous test results
  • Scaffolding test files

Rules

  • Test runs are asynchronous. `test_run`, `test_run_by_name`, `test_discover_start` and the `test_create_*` skills return a `jobId` at once. Poll with `test_get_result(jobId)` or `test_discover_get_result(jobId)`.
  • Unity Test Runner runs one job at a time. Do not start a second `test_run` while another test job is active.
  • `test_run` in PlayMode and `test_run_by_name` in PlayMode enter Play Mode (`MayEnterPlayMode`).
  • `test_create_editmode` and `test_create_playmode` write a `.cs` file and trigger a domain reload. The server is briefly unavailable; retry as the root protocol describes.
  • `test_list` and `test_list_categories` return `pendingDiscovery=true` with a `discoveryJobId` on a cache miss. Poll `test_discover_get_result(jobId)`, then call again.
  • For compile errors use `debug_check_compilation` in the [debug](../debug/SKILL.md) module. To edit a generated test, use the [script](../script/SKILL.md) module.
  • `test_smoke_skills` uses transient probes, so it does not pollute workflow or batch persistence. It skips any skill with `MayTriggerReload`.

Pitfalls

  • `test_run_all`, `test_create_template`, `test_get_status` and `test_run_async` do not exist. Use `test_run` or `test_run_by_name`, `test_create_editmode` or `test_create_playmode`, and `test_get_result`.
  • `test_discover_get_result` and `test_list` both report counts, but `count` means different things. In `test_list`, `count` is the number returned and `total` is the number discovered. In `test_discover_get_result`, `count` is the number discovered and `returned` is the number in `tests`. The default `limit` (100) caps a larger suite: check `truncated`, and take the suite size from `total` (test_list) or `count` (discover).
  • `test_cancel` is best effort: Unity Test Runner has no hard cancel.

Skills

test_run

Run tests asynchronously. Returns a `jobId` at once.

| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | testMode | string | No | "EditMode" | `EditMode` or `PlayMode` | | filter | string | No | - | Test filter passed to the runner |

**Returns**: `{success, status, jobId, kind, testMode, filter, message}`

test_run_by_name

Run specific tests by class or method name.

| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | testName | string | Yes | - | Test class or method name | | testMode | string | No | "EditMode" | `EditMode` or `PlayMode` |

**Returns**: `{success, jobId, testName, testMode}`

test_get_result

Get the result of a test run.

| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | jobId | string | Yes | Job ID from `test_run` or `test_run_by_name` |

**Returns**: `{success, jobId, status, totalTests, passedTests, failedTests, skippedTests, inconclusiveTests, otherTests, failedTestNames, failedTestDetails, elapsedSeconds, resultSummary, error}`. Each entry in `failedTestDetails` has `name`, `resultState`, `message`, `stackTrace`, `durationSeconds` and `output`.

test_get_last_result

Get the most recent test run result.

**Parameters**: none.

**Returns**: `{jobId, status, total, passed, failed, skipped, inconclusive, other, failedNames}`

test_cancel

Cancel a running test job, best effort.

| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | jobId | string | Yes | Job ID to cancel |

**Returns**: `{success, jobId, status, cancelled, note, warnings}`

test_list

List tests through asynchronous discovery.

| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | testMode | string | No | "EditMode" | `EditMode` or `PlayMode` | | limit | int | No | 100 | Max tests to return |

**Returns**: `{success, testMode, discoveryMode, count, total, truncated, tests, pendingDiscovery, discoveryJobId, discoveryStatus}`. `count` is the number returned; `total` is the number discovered.

test_list_categories

List test categories through asynchronous discovery. Same cache-miss pattern as `test_list`.

| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | testMode | string | No | "EditMode" | `EditMode` or `PlayMode` |

**Returns**: `{success, testMode, discoveryMode, count, categories, pendingDiscovery, discoveryJobId, discoveryStatus, note}`

test_discover_start

Start asynchronous discovery and return a discovery `jobId`. Use it when you want explicit control; otherwise `test_list` and `test_list_categories` start discovery on a cache miss.

| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | testMode | string | No | "EditMode" | `EditMode` or `PlayMode` |

**Returns**: `{success, status, jobId, kind, testMode, message}`

test_discover_get_result

Get the result of a discovery job.

| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | jobId | string | Yes | - | Discovery job ID | | limit | int | No | 100 | Max tests in the response |

**Returns**: `{success, jobId, status, testMode, discoveryMode, count, returned, truncated, tests, error}`. `count` is the discovered total; `returned` is the number in `tests`.

test_get_summary

Get the aggregated summary across all runs.

**Parameters**: none.

**Returns**: `{success, totalRuns, completedRuns, totalPassed, totalFailed, totalSkipped, totalInconclusive, totalOt

Read more
@besty0728
Ships withunity-skills

REST API-based AI-driven Unity Editor Automation Engine Let AI control Unity scenes directly through Skills 🎉 We are now indexed by DeepWiki! Got questions? Check out the AI-generated docs → The current official maintenance baseline is Unity 2022.3+.

Stars on GitHub

Momentum

stars in total
1.9k
Star history of Besty0728/Unity-Skills on GitHub, a chart by star-history.com

Other skills on unity-skills.

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills10d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc12d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react1d252k
@facebook@facebookInstall Skill

Questions about test.

Which coding agents can use test?
test installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.