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.
Choose the settings(ScriptBackend -
IL2CPP, BuildTarget, CLI(Headless) or GUI) and select
You can see the test result of CUI(Headless) player or
GUI player on your built platforms.
The test is same as listed on Unity Test Runner's PlayMode tests.
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.
RuntimeUnitTestToolkit.unitypackage on releases page or
package.json exists on
RuntimeUnitTestToolkit/Assets/RuntimeUnitTestToolkit for package manager.
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.
|/headless||Boolean switch, build CLI mode. Default is false.|
|/scriptBackend ScriptingImplementation||Enum string(
|/buildTarget BuildTarget||Enum string(
|/buildPath FilePath||String path. Default is
You can pass by
This library is under the MIT License.