Unity Test

Generate NUnit Edit and PlayMode tests for Unity MonoBehaviours.

7|Updated Feb 27, 2026
One-click install
npx skills add https://github.com/JulianKerignard/Unity-Skills --skill unity-test-juliankerignard
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Unity Test
Source: https://github.com/JulianKerignard/Unity-Skills/tree/main/skills/unity-test
Command: npx skills add https://github.com/JulianKerignard/Unity-Skills --skill unity-test-juliankerignard

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Generates and executes Unity tests (NUnit) by analyzing target code, extracting testable logic, and scaffolding tests for EditMode and PlayMode.

Core Features & Use Cases

  • Analyze target MonoBehaviours to identify dependencies and side effects.
  • Generate NUnit tests for both EditMode (pure logic) and PlayMode (scene/lifecycle) with templates.
  • Provide guidelines for project structure, assembly definitions, and test organization to ensure reliable test runs.

Quick Start

Analyze a Unity project file, select the target script, and run the test generation workflow to produce NUnit tests ready for Unity Test Runner.

Frequently Asked Questions about Unity Test

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

FAQPage Schema
How do I generate NUnit tests for Unity MonoBehaviours?

To generate NUnit tests for Unity, the Skill analyzes target MonoBehaviours and extracts testable logic to scaffold production-ready tests. It applies EditMode tests for pure logic and PlayMode tests when Unity lifecycle or scene interaction is required.

When should I use EditMode versus PlayMode tests in Unity?

Use EditMode tests for pure logic without Unity lifecycle dependencies, and PlayMode tests when scene interaction or Unity lifecycle events are required. The Skill identifies these dependencies during code analysis to apply the correct test mode.

How do I set up assembly definitions for Unity Test Runner?

Setting up assembly definitions for Unity Test Runner requires proper project structure and test organization. The Skill provides guidelines for assembly definitions and NUnit integration to ensure generated tests run reliably within the Test Runner.

Can I automate Unity tests for async methods and coroutines?

Yes, you can automate Unity tests for async methods and coroutines. The Skill analyzes target MonoBehaviours and covers async operations and coroutines as needed, generating PlayMode tests that validate these asynchronous behaviors within Unity's Test Runner.

What's the best way to structure a Unity test project for reliable test runs?

The best way to structure a Unity test project is to follow guidelines for assembly definitions, test organization, and NUnit integration. The Skill satisfies these structural requirements automatically so generated tests run reliably within Unity's Test Runner.