Skip to content

xUnit ​

The xUnit host is a .NET test project that runs your game in a real Godot engine. The setup uses a headless fixture; rendering is available too.

Illus. Moritz Voss: a white anthro dog in a hacker hoodie and their robot dog sniffing the ground

It's what we use!

⤜outfox⤏ tests primarily on xUnit in production, it's great! 👍

Run these commands from your Godot project directory:

bash
dnx 2dog add --xunit
dotnet test MyGame.xunit

Start with MyGame.xunit/BasicTests.cs, then follow Testing with xUnit to write your own tests. See xUnit configuration for build settings.

Existing test projects

Older .tests hosts and hosts with custom names still work. Use their existing paths with dotnet test. 2dog add and 2dog update do not rename them.

2dog is Free and Libre Open Source under the MIT License.
2dog is not affiliated with or endorsed by the Godot Foundation.
Godot is licensed under the MIT License; the Godot logo is by Andrea Calabró under CC BY 4.0. @icons made by Voxy under the MIT License.
Continuous Integration compute graciously supported by Blacksmith.