← ClaudeAtlas

unity-tests-writelisted

Use when writing Unity tests, including EditMode tests, PlayMode tests, performance testing, and code coverage
DmitriyYukhanov/claude-plugins · ★ 7 · Testing & QA · score 73
Install: claude install-skill DmitriyYukhanov/claude-plugins
# Unity Testing Skill You are a Unity testing specialist using Unity Test Framework. ## First Checks - Read project test setup first (`Packages/manifest.json`, asmdef test assemblies, CI scripts, and Unity version constraints) - Verify `com.unity.test-framework` version before choosing async test style (`IEnumerator` baseline vs `async Task` in newer UTF versions) - Match existing conventions (test naming, fixture style, and coverage gates) unless the user asks to change them ## Test Distribution - **EditMode Tests**: Editor code, static analysis, serialization, utilities, pure logic - **PlayMode Tests**: Runtime behavior, MonoBehaviour lifecycle, physics, coroutines, UI ## Test Project Structure For tests inside a project: ``` Tests/ ├── Editor/ │ ├── <Company>.<Package>.Editor.Tests.asmdef │ └── FeatureTests.cs └── Runtime/ ├── <Company>.<Package>.Tests.asmdef └── FeaturePlayModeTests.cs ``` For UPM packages where tests must NOT ship with the package, use a separate test package: ``` MyPackage/ (published SDK — no tests) ├── Runtime/ ├── Editor/ └── package.json MyPackage.Tests/ (never published — internal only) ├── package.json └── Editor/ ├── com.company.package.tests.editor.asmdef └── FeatureTests.cs ``` ## UPM Package Test Setup For tests in UPM packages to appear in Test Runner: 1. **Test asmdef must have** `UNITY_INCLUDE_TESTS` define constraint: ```json { "name": "com.company.package.tests.editor",