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 9 for Godot 4
GUT 9.0.1 has been released for Godot 4.
- For a list of everything that is new or has changed in Godot 4, read this page: https://bitwes.github.io/GutWiki/Godot4/New-For-Godot-4.html.
- The wiki for the Godot 4 version of GUT is at: https://bitwes.github.io/GutWiki/Godot4/Home.html
- The Godot 4 version of GUT is maintained on the
godot_4
branch.
GUT 7 for Godot 3.x
GUT 7.4.1 is the current version for Godot 3.x
Donate/Shameless Plug
If you would like to help support GUT check out my game Country or State on Android and iOS. Then, purchase the full version even if you don't like it. Thanks!
Features
- Godot 3.4.x, 3.5.x, 4.x (godot_4 branch) compatible.
- Simple install via the Asset Library (7.x and 9.x are in 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.
- Distribute your tests with your project and run them on any platform Godot supports.
More info can be found in the wiki.
Getting Started
VSCode Extension
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.
License
Gut is provided under the MIT license. License is in addons/gut/LICENSE.md
Tutorials
- TDD and P O N G Series
- Wiki list of tutorials https://github.com/bitwes/Gut/wiki/Tutorials