uloop-run-tests
uloop run-tests
Execute Unity Test Runner. When tests fail, NUnit XML results with error messages and stack traces are automatically saved. Read the XML file at XmlPath for detailed failure diagnosis.
Usage
uloop run-tests [options]
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
--test-mode |
string | EditMode |
Test mode: EditMode, PlayMode |
--filter-type |
string | all |
Filter type: all, exact, regex, assembly |
--filter-value |
string | - | Filter value (test name, pattern, or assembly) |
Global Options
| Option | Description |
|---|---|
--project-path <path> |
Optional. Use only when the target Unity project is not the current directory. |
Examples
# Run all EditMode tests
uloop run-tests
# Run PlayMode tests
uloop run-tests --test-mode PlayMode
# Run specific test
uloop run-tests --filter-type exact --filter-value "MyTest.TestMethod"
# Run tests matching pattern
uloop run-tests --filter-type regex --filter-value ".*Integration.*"
Output
Returns JSON with:
Success(boolean): Whether all tests passedMessage(string): Summary messageTestCount(number): Total tests executedPassedCount(number): Passed testsFailedCount(number): Failed testsSkippedCount(number): Skipped testsXmlPath(string): Path to NUnit XML result file (auto-saved when tests fail)
XML Result File
When tests fail, NUnit XML results are automatically saved to {project_root}/.uloop/outputs/TestResults/<timestamp>.xml. The XML contains per-test-case results including:
- Test name and full name
- Pass/fail/skip status and duration
- For failed tests:
<message>(assertion error) and<stack-trace>
More from hatayama/unity-cli-loop
uloop-control-play-mode
Control Unity Editor play mode (play/stop/pause). Use when you need to: (1) Start play mode to test game behavior, (2) Stop play mode to return to edit mode, (3) Pause play mode for frame-by-frame inspection.
3uloop-compile
Compile Unity project and report errors/warnings. Use when you need to: (1) Verify code compiles after C# file edits, (2) Check for compile errors before testing, (3) Force full recompilation with Domain Reload. Returns error and warning counts.
2uloop-screenshot
Capture screenshots of Unity Editor windows as PNG files. Use when you need to: (1) Screenshot Game View, Scene View, Console, Inspector, or other windows, (2) Capture current visual state for debugging or documentation, (3) Save editor window appearance as image files.
2uloop-launch
Launch Unity project with matching Editor version via uloop CLI. Use when you need to: (1) Open a Unity project with the correct Editor version, (2) Restart Unity to apply changes, (3) Switch build target when launching.
2uloop-get-logs
Retrieve logs from Unity Console with filtering and search. Use when you need to: (1) Check for errors or warnings after compilation or play mode, (2) Debug issues by searching log messages, (3) Investigate failures with stack traces. Supports filtering by log type, text search, and regex.
2uloop-find-game-objects
Find GameObjects in the active scene by various criteria. Use when you need to: (1) Search for objects by name, regex, or path, (2) Find objects with specific components, tags, or layers, (3) Get currently selected GameObjects in Unity Editor. Returns matching GameObjects with hierarchy paths and components.
2