Author and run the Unity game-engine Test Framework (`com.unity.test-framework`, currently v1.8). Distinct from the ThrowTheSwitch Unity C testing library at throwtheswitch.org/unity - the two tools share only a name. Covers package install via Package Manager, the EditMode vs PlayMode split, the [Test] / [UnityTest] / [SetUp] / [TearDown] / [UnityPlatform] attributes, assembly-definition setup (Editor folder vs asmdef with `includePlatforms` / `optionalUnityReferences: [TestAssemblies]`), Test Runner window, command-line batch invocation with `-runTests` / `-testPlatform` / `-testResults` / `-testFilter` / `-testCategory`, NUnit 3.5 assertion API, and CI integration. Use when the unit under test is C# Unity code that needs to exercise the Unity runtime or editor.
70
88%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Low
Low-risk findings worth noting
Attributes for unity-test-framework, per the v1.4 manual index and the NUnit 3.5 docs the framework wraps.
| Attribute | Purpose | Source |
|---|---|---|
[Test] | Plain NUnit test - synchronous | NUnit; recommended default per edit-mode-vs-play-mode docs |
[UnityTest] | Coroutine-style test that can yield frames / seconds in PlayMode or skip frames in EditMode | UTF-specific |
[SetUp] / [TearDown] | Per-test fixture setup / cleanup | NUnit |
[OneTimeSetUp] / [OneTimeTearDown] | Once-per-fixture setup / cleanup | NUnit |
[TestFixture] | Marks a class as containing tests (optional in NUnit 3) | NUnit |
[Category("Smoke")] | Tag a test for filtering | NUnit; selectable via CLI -testCategory |
[UnityPlatform(RuntimePlatform.WindowsPlayer)] | Restrict test to specific runtime platforms | UTF-specific |
[ValueSource(nameof(MyCases))] | Parameterised inputs | NUnit; ValueSource is supported per the v1.4 manual (other parameterised attributes have known limitations - see the skill's Limitations section) |