test-writing-guide

Installation
SKILL.md

Guide for writing test code for Unity projects.

Test code is code: load the code-writing-guide skill too, which holds the Unity rules that apply to every code file (checking Play Mode before editing, never creating .meta files, etc.).

Terms:

  • Test basis — a file or a URL, e.g., of an issue or a wiki page, that the test code is written from: one that states its specification, or one read that settled what the specification leaves open; text written directly or taken from the conversation is no test basis.

Rules

Test Design Tags

  • Do not touch the test of a test case tagged existing.
  • For a test case tagged test fix or spec change, change the existing test to match the test case instead of adding a new one.
  • Do not implement a test case whose Verification column starts with **unverifiable**, **undefined**, or **ambiguous**: the test cannot arrange its input, cannot observe its actual result, or has no single expected result to assert.

Test Basis

List the test bases at the top of each test file you write or modify, below its header comment if any, one // Test-basis: line each:

Installs
10
GitHub Stars
20
First Seen
Jul 24, 2026