Skip to content
Agentmart
Submit a tool

unity-test

Run Unity Test Framework tests (EditMode and PlayMode) in batch mode

Skill by minsley

IndexedMIT
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/minsley-unity-test

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Run Unity Test Framework tests (EditMode and PlayMode) in batch mode

Use cases: testing

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/unity-test

What's inside

Skill name
unity-test
Description
Run Unity Test Framework tests (EditMode and PlayMode) in batch mode
License
MIT
Instructions
76 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Unity Test

Use this skill to run Unity Test Framework tests in headless batch mode.

## 1. Find Unity Editor

```bash
UNITY_BIN=$(find /opt/unity -name "Unity" -type f 2>/dev/null | head -1)
```

## 2. Check for Tests

```bash
# EditMode tests
find Assets -path "*/Tests/EditMode/*.cs" -o -path "*/Tests/Editor/*.cs" 2>/dev/null

# PlayMode tests
find Assets -path "*/Tests/PlayMode/*.cs" -o -path "*/Tests/Runtime/*.cs" 2>/dev/null

# Test assembly definitions
find Assets -name "*.asmdef" 2>/dev/null | xargs grep -l "testAssemblies\|UnityEditor.TestRunner" 2>/dev/null
```

## 3. Run EditMode Tests

```bash
$UNITY_BIN -batchmode -nographics -projectPath . \
  -runTests -testPlatform EditMode \
  -testResults /tmp/editmode-results.xml \
  -logFile /tmp/unity-editmode.log -quit
TEST_EXIT=$?

echo "EditMode tests exit code: $TEST_EXIT"
```

## 4. Run PlayMode Tests

PlayMode tests may need Xvfb for rendering:

```bash
xvfb-run --auto-servernum $UNITY_BIN -batchmode -nographics -projectPath . \
  -runTests -testPlatform PlayMode \
  -testResults /tmp/playmode-results.xml \
  -logFile /tmp/unity-playmode.log -quit
TEST_EXIT=$?

echo "PlayMode tests exit code: $TEST_EXIT"
```

## 5. Parse Results

```bash
# Quick summary from NUnit XML results
if [ -f /tmp/editmode-results.xml ]; then
  echo "=== EditMode Results ==="
  grep -oP 'total="\K[^"]+' /tmp/editmode-results.xml | head -1
  grep -oP 'passed="\K[^"]+' /tmp/editmode-results.xml | head -1
  grep -oP 'failed="\K[^"]+' /tmp/editmode-results.xml | head -1
fi

if [ -f /tmp/playmode-results.xml ]; then
  echo "=== PlayMode Results ==="
  grep -oP 'total="\K[^"]+' /tmp/playmode-results.xml | head -1
  grep -oP 'passed="\K[^"]+' /tmp/playmode-results.xml | head -1
  grep -oP 'failed="\K[^"]+' /tmp/playmode-results.xml | head -1
fi
```

## 6. Troubleshooting

- **No tests found**: Check `.asmdef` files reference `UnityEngine.TestRunner` and `UnityEditor.TestRunner`
- **PlayMode tests hang**: Use `xvfb-run` and set a timeout: `timeout 300 xvfb-run ...`
- **Assembly errors**: Check that test assemblies reference the correct production assemblies
- **Exit code 2**: Tests ran but some failed — check the XML results for details

From minsley/lobmob, MIT.

More from minsley/lobmob

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Feb 13, 2026 (8 months ago)
Last release
Feb 26, 2026 (8 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from minsley

Cite this page

unity-test skill. Agent Mart. https://agentmart.dev/skills/minsley-unity-test (last updated 2026-10-24)