Skip to content
CLI/GUI Frontend of Unity Test Runner to test on any platform.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
RuntimeUnitTestToolkit version is 2 May 5, 2019
.gitignore v2 May 5, 2019
LICENSE Initial commit Mar 5, 2017
README.md

README.md

RuntimeUnitTestToolkit(v2)

CircleCI

RuntimeUnitTestToolkit is the supplement of Unity Test Runner. Unity Test Runner works fine but player runner(any target platform) is very poor. RuntimeUnitTestToolkit provides CLI(for run on CI) and GUI(for run on any platforms(Windows, Mac, iOS, Android, etc...)) frontend of Unity Test Runner.

You can write test that work on Unity Test Runner, it also can build runtime player by RuntimeUnitTestToolkit.

image

Choose the settings(ScriptBackend - Mono or IL2CPP, BuildTarget, CLI(Headless) or GUI) and select BuildUnitTest.

image

You can see the test result of CUI(Headless) player or

image

GUI player on your built platforms.

The test is same as listed on Unity Test Runner's PlayMode tests.

image

Target test allows asmdef's Test Assemblies so does not includes test files when standard build(but include when build by RuntimeUnitTestToolkit automatically).

On CI(use CLI(Headless) mode), if fail the test, shows red. You can notify to Slack or other communication tools by CI's integration.

image

Install

RuntimeUnitTestToolkit.unitypackage on releases page or package.json exists on RuntimeUnitTestToolkit/Assets/RuntimeUnitTestToolkit for package manager.

CommandLine Reference

For example, this library's CI itself.

# build headless, mono, Linux player
- run:
    name: Build Linux(Mono)
    command: /opt/Unity/Editor/Unity -quit -batchmode -nographics -silent-crashes -logFile -projectPath . -executeMethod UnitTestBuilder.BuildUnitTest /headless /ScriptBackend Mono2x /BuildTarget StandaloneLinux64
    working_directory: RuntimeUnitTestToolkit
# execute player on CI
- run: RuntimeUnitTestToolkit/bin/UnitTest/StandaloneLinux64_Mono2x/test

You can invoke -executeMethod UnitTestBuilder.BuildUnitTest and some options.

Command Desc
/headless Boolean switch, build CLI mode. Default is false.
/scriptBackend ScriptingImplementation Enum string(Mono2x or IL2CPP or WinRTDotNET )
/buildTarget BuildTarget Enum string(StandaloneWindows64, iOS, Android, etc...)
/buildPath FilePath String path. Default is bin/UnitTest/{BuildTarget}_{ScriptBackend}/test(If windows, test.exe)

You can pass by / prefix.

License

This library is under the MIT License.

You can’t perform that action at this time.