-
Notifications
You must be signed in to change notification settings - Fork 107
Home
Butch Wesley edited this page Jun 17, 2020
·
38 revisions
GUT (Godot Unit Test) is a utility for writing tests for your Godot Engine game. It allows you to write tests for your gdscripts in gdscript.
- As of version 6.8.1 Gut is compatible with version 3.2.x as well as 3.1.x.
- Install
- Quick Start
- Asserts and Methods
- Creating Tests
- Gut Settings and Methods
- Using Gut at the command line
- Inner Test Classes
- Doubling
- Spies
- Stubbing
- Parameterized Tests
- Simulate
- Yielding during tests
- Pre/Post Run Hooks
- Output Box.
- List of Test Scripts. Inner Classes are indented under scripts.
- Progress bars for all scripts and the current script.
- Log Level slider.
- Previous Script (in list of scripts)
- Run the currently selected script and all scripts after it. This can be especially useful when running on another device and some script in the middle of the list causes a crash. To run the tests after the crash, just select that test in the list and click this button. It will run that one and all the ones after.
- Next Script (in list of scripts)
- Run the currently selected script. If an Inner Class is selected then just that class will be run. If a Script is selected then the script and all of its Inner Classes will be run.
- Toggle display of List of Test Scripts
- The Hamburger button. It shows some additional options.
- Continue button will be enabled if a call to
yield_before_teardown
occurs. Click it to continue running tests. - The title bar. It has a maximize button, shows the current script, has a running tally on the left of the pass/fail count, shows the elapsed time. Also you can drag it all about.
Also, in the bottom right corner, you can drag to resize the dialog.
There are a fair number of warnings that Godot will show related to GUT. Some of the warnings are valid and are being cleaned up overtime. Most of the warnings are not valid and sometimes relate to generated code. As of 3.2 you can disable warnings for addons, and it recommended you do so.
Gut is provided under the MIT license. The license is distributed with Gut so it is in the addons/gut
folder.
You can talk to me, Butch Wesley
- Github: bitwes
- Godot forums: bitwes
- Godot Discord: bitwes