run-tests

Installation
SKILL.md

Guide for running Unity tests with the run_unity_tests tool, running Play Mode tests on a standalone player, and verifying [Category("VisualVerification")] tests from their screenshots.

Gotchas

  • Never call two Unity Editor tools in parallel. unity_play_control, get_unity_compilation_result, run_unity_tests, and run_method_in_unity must be called strictly one at a time — always wait for each call to return before making the next one. Calling them concurrently causes domain-reload conflicts that result in "canceled" or "did not connect within 30 seconds" errors.
  • When a Unity Editor tool returns error or canceled, wait 10 seconds before retrying. Domain reload typically takes several seconds; immediate retry hits the same in-flight reload and fails again. Do not switch tools in the meantime (e.g., calling unity_play_control to verify state) — that just compounds the multiplexed calls. If the same tool returns error or canceled on two consecutive attempts (with the 10-second wait between them), stop and consult the user instead of retrying further.
  • After adding or deleting assets that a [TestCaseSource] or [ValueSource] enumerates, request a domain reload before running the tests. The Editor builds the test tree once per domain and reuses it, and an asset import (AssetDatabase.Refresh) does not reload the domain, so the test cases stay as they were at the last reload — a source that found no assets then keeps failing with No arguments were provided. Call run_method_in_unity with assemblyName: UnityEditor.CoreModule, typeName: UnityEditor.EditorUtility, methodName: RequestScriptReload, then run the tests.

Run Tests

Before running tests, complete the following steps in order:

Installs
8
GitHub Stars
20
First Seen
Jul 24, 2026