tests-run

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

Updated Jul 20, 2026
One-click install
npx skills add https://github.com/PMK95/GridSquad --skill tests-run-pmk95
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: tests-run
Source: https://github.com/PMK95/GridSquad/tree/main/GridSquadUnity/.agents/skills/tests-run
Command: npx skills add https://github.com/PMK95/GridSquad --skill tests-run-pmk95

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 through the unity-mcp-cli and returns structured per-test results, summaries, and logs directly to the agent. ## Core Features & Use Cases - Filtered Test Execution: Run tests filtered by mode, assembly, namespace, class, or fully qualified method name. - Configurable Result Detail: Toggle passing test details, messages, stack traces, and captured console logs with severity filtering. - Domain Reload Resilience: Persists run parameters to SessionState and resumes automatically after compilation-triggered domain reloads. - Use Case: After refactoring a gameplay class, ask the agent to run only the affected test fixture in EditMode and report failing tests with stack traces, without touching the Unity Editor UI. ## Quick Start Run all EditMode tests in my 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 with 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 tests inside the Unity Editor and returns a structured summary plus per-test results.

How to run a single Unity test method instead of the whole suite?▼

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.

What is the difference between EditMode and PlayMode tests in Unity?▼

EditMode tests run in the editor without entering play mode, making them faster for iteration. PlayMode tests run in a runtime scene context and suit integration scenarios; this tool supports both via the testMode parameter.

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

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

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

The tool persists run parameters to SessionState, returns a Processing status, and automatically resumes the run after the domain reload completes. Pre-existing compilation errors short-circuit the run and return error details.