Skip to content
Run Xunit tests on Unity player
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Build using GitHub Actions May 23, 2019
Packages Initial commit May 22, 2019
.gitignore Build using GitHub Actions May 23, 2019 Changelog Jul 10, 2019
LICENSE Readme and license files May 24, 2019 --select-{class,method,trait-condition} options Jun 27, 2019 Build using GitHub Actions May 23, 2019 Release note Jul 10, 2019 Unity Runner

This program runs unit tests on Unity player so that a software work well on Unity's peculiar runtime environment, which differs from stable Mono.

You can download the executable binaries from the releases page.

This program takes one or more absolute paths to .NET assembly files (.dll) and run tests in them, e.g.:

./StandaloneLinux64 "$(pwd)"/YourTests.dll
StandaloneWindows64.exe C:\path\to\YourTests.dll

It also takes several options like -c/--select-class and -T/--exclude-trait-condition. See --help for details.

On macOS you need to invoke the actual executable binary in directory, e.g.: "$(pwd)"/YourTests.dll

Note that .dll files to test should target on .NET Framework (e.g., net461), not .NET Core.


I got Magic number is wrong: 542 error. I'm on Linux.

If the TERM environment variable is not set or it's a value unsupported by Mono (e.g., xterm-256color) yet Unity player's built-in Mono runtime could throw such an exception. You could work around this by setting it xterm:

TERM=xterm ./StandaloneLinux64 "$(pwd)"/YourTests.dll

See also the related issue on the Mono project:

You can’t perform that action at this time.