tests-run

Execute Unity EditMode or PlayMode tests and return per-test results with filters.

Updated May 27, 2026
One-click install
npx skills add https://github.com/AdielMag/ClashUp --skill tests-run-adielmag
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: tests-run
Source: https://github.com/AdielMag/ClashUp/tree/main/client/ClashUp.Unity/.claude/skills/tests-run
Command: npx skills add https://github.com/AdielMag/ClashUp --skill tests-run-adielmag

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires unity-mcp-cli.

What problem does it solve? Running Unity tests from an AI-assisted workflow normally requires opening the Unity Test Runner UI and manually reading results. This Skill executes EditMode or PlayMode tests programmatically through the unity-mcp-cli and returns structured per-test results, including failures, messages, stack traces, and captured console logs. ## Core Features & Use Cases - Filtered Test Execution: Run tests filtered by mode, assembly, namespace, class, or a fully qualified test method, with EditMode recommended for fast iteration. - Detailed Result Reporting: Toggle inclusion of passing tests, messages, stack traces, and console logs with severity filtering to control response size. - Domain Reload Resilience: Automatically defers and resumes test runs across Unity domain reloads when script compilation is triggered, and reports pre-existing compilation errors. - Use Case: After refactoring a gameplay class, ask the AI to run only the affected test fixture in EditMode and return failing tests with stack traces so you can fix regressions immediately. ## Quick Start Run all EditMode tests in the Unity project and show me only the failing tests with their stack traces.

Frequently Asked Questions about tests-run

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run Unity tests from the command line or an AI agent?▼

Use the unity-mcp-cli run-tool tests-run command with a JSON input specifying testMode and optional filters. The tool executes EditMode or PlayMode tests inside the Unity Editor and returns structured per-test results.

How do I run a single Unity test method?▼

Pass the testMethod parameter with the fully qualified name, such as MyNamespace.FixtureName.TestName. You can also combine testAssembly, testNamespace, and testClass filters to narrow the run.

Should I use EditMode or PlayMode for Unity tests?▼

EditMode is the default and recommended for faster iteration during development since it runs without entering play mode. Use PlayMode when tests depend on runtime scene behavior or instantiated GameObjects.

Why does the Unity test run fail with an InvalidOperationException about dirty scenes?▼

The tool requires every open scene to be saved before running tests. If any scene has unsaved changes, the run aborts and lists the dirty scenes; save them in the Unity Editor and retry.

What happens if scripts recompile during a Unity test run?▼

If the AssetDatabase refresh triggers compilation, the run parameters are persisted to SessionState, the tool returns Processing, and the test run resumes automatically after the domain reload completes.

What do I do if unity-mcp-cli is not found?▼

Install it globally with npm install -g unity-mcp-cli, or invoke it via npx unity-mcp-cli. Detailed setup steps are available in the unity-initial-setup skill.