If you'd like to support me you can buy me a coffee.
GUT (Godot Unit Test) is a unit testing framework for the Godot Engine. It allows you to write tests for your gdscript in gdscript.
GUT versions 9.x are for Godot 4.x.
GUT versions 7.x (currently 7.4.2) are for Godot 3.x.
Documentation is hosted at https://gut.readthedocs.io/
There are only two versions of GUT in the Asset Library (one for Godot 3 and one for Godot 4). GUT will not appear in the Asset Library if your current version of Godot is less than GUT's required version. Here's the highest version of GUT per Godot version.
GUT | Required Godot Version |
|||
---|---|---|---|---|
godot_4_5 branch | 4.5 | |||
Main Branch | 4.4 | |||
9.4.0 | 4.3 | repo | zip | Asset Library |
9.3.0 | 4.2 | repo | zip | |
9.1.1 | 4.1 | repo | zip | |
9.0.1 | 4.0 | repo | zip | |
7.4.3 | 3.5 | repo | zip | Asset Library |
To install from the zip link:
- Download the zip and extract it
- Put the
addons/gut
directory into your project. - Enable the GUT plugin.
You will need to relaunch Godot.
- Simple install via the Asset Library
- A plethora of asserts and utility methods to help make your tests simple and concise
- Support for Inner Test Classes to give your tests some extra context and maintainability
- Doubling: Full and Partial, Stubbing, Spies
- Command Line Interface (CLI)
- Parameterized Tests
- Export results in standard JUnit XML format
Run your tests directly from the VSCode Editor. Search VSCode extensions for "gut-extension". The plugin has commands to run your entire test suite, a single test script or a single test.
Thanks for using GUT. If you'd like to support me you can buy me a coffee.
Gut is provided under the MIT license. License is in addons/gut/LICENSE.md
.