Unity Test Setup
Writes and runs Unity EditMode and PlayMode tests, including headless CI runs and reading the results properly.
Claude's review
7/10 Practical Unity Test Framework guide: asmdef setup, EditMode vs PlayMode, headless runTests flags, reading result XML, dotnet fallback.
We asked Claude the question you would ask: would I be glad I installed this? Two separate reviews, the second blind to the first, must both rate a skill 7 or higher before we sell it.
In detail
Use when writing or running Unity tests - Unity Test Framework EditMode vs PlayMode, test assembly definitions, testing plain C# and ScriptableObjects, PlayMode scene/physics/input tests, batchmode CLI with result XML, coverage, and the dotnet test fallback when no editor is installed.
How you use it
- Add it to your pack, then download your pack (1 credit).
- In Claude, open Customize > Skills and upload the zip. Code execution needs to be on under Settings > Capabilities.
- Ask Claude for the job in your own words. It uses the skill when your request matches what it does. Step by step guide
Safety check
Nothing risky found: no hidden instructions, no download and run, no reading of saved passwords or keys.
An automated scan lowers risk but cannot promise zero risk. How we check skills
Preview
The first lines of SKILL.md
---
name: unity-testing
category: testing
description: Use when writing or running Unity tests - Unity Test Framework EditMode vs PlayMode, test assembly definitions, testing plain C# and ScriptableObjects, PlayMode scene/physics/input tests, batchmode CLI with result XML, coverage, and the dotnet test fallback when no editor is installed.
tech_stack: Unity
source: informed by the Unity Test Framework, Input System testing and Code Coverage package docs; own wording
---
# Unity Testing
## Overview
The Unity Test Framework (NUnit 3 underneath) runs tests in two modes. EditMode tests run in the editor without entering Play mode — fast, ideal for plain C# rules, ScriptableObjects and editor tooling. PlayMode tests run the player loop — needed for scenes, physics, coroutines and input, and slower. Most tests should be EditMode tests against plain classes (testable-game-logic).
**Core principle:** EditMode first; PlayMode only for behaviour that needs the player loop. Read the result XML, not the log tail.
## Which mode
| Question | Mode | Typical setup |
|---|---|---|
| Does the damage/cooldown/inventory rule compute correctly? | EditMode | `new` the plain class |
| Is every shipped definition valid? | EditMode | `AssetDatabase.FindAssets` |
| Does a ScriptableObject-driven system behave? | EditMode | `ScriptableObject.CreateInstance<T>()` |
| Does the character land on the floor / trigger fire? | PlayMode | load a test scene, `WaitForFixedUpdate` |
| Does pressing Jump jump? | PlayMode | `InputTestFixture` |
| Does the coroutine/Awaitable sequence finish? | PlayMode | `[UnityTest]` yielding frames |
## Test assemblies
```json
{
"name": "Tests.EditMode",
"references": ["Game.Core", "Game.Runtime", "UnityEngine.TestRunner", "UnityEditor.TestRunner"],
"includePlatforms": ["Editor"],
"overrideReferences": true,
"precompiledReferences": ["nunit.framework.dll"],
"defineConstraints": ["UNITY_INCLUDE_TESTS"],
"autoReferenced": false
}
```
...From makifbaysal's repository, Apache-2.0 licence.
Related skills
-
Checked
Game Audio Mixing
Sets up game audio buses, volume sliders, music ducking and adaptive music for Godot, Unity or FMOD.
8/101 credit -
Checked
Game camera tuning
Builds and tunes follow, orbit and first person game cameras in Godot or Cinemachine so they stop jittering.
8/101 credit -
Checked
Game Enemy AI
Designs enemy AI with perception, pathfinding and steering so enemies chase fairly and never get stuck.
8/101 credit -
Checked
Game Loop and Timing
Makes movement, timers and physics behave the same at any frame rate in Unity, Godot, Bevy and web games.
7/101 credit -
Checked
Godot Game Testing
Writes and runs Godot tests with gdUnit4 or GUT, including scene tests and headless runs that report real results.
7/101 credit -
Checked
Game Security Review
Reviews Unity, Godot and Unreal code for cheats that hurt other players, purchase exploits and unsafe save files.
7/101 credit