81 lines
4.9 KiB
Markdown
81 lines
4.9 KiB
Markdown

|
|
|
|
|
|
|
|
# GUT
|
|
GUT (Godot Unit Test) is a unit testing framework for the [Godot Engine](https://godotengine.org/). It allows you to write tests for your gdscript in gdscript.
|
|
|
|
GUT versions 9.x are for Godot 4.x.<br>
|
|
GUT versions 7.x (currently 7.4.2) are for Godot 3.x.
|
|
|
|
|
|
# Support
|
|
If you'd like to support GUT development you can [buy me a coffee](https://buymeacoffee.com/bitwes).
|
|
|
|
|
|
# Wiki
|
|
Documentation is hosted at https://gut.readthedocs.io/, you can find release-specific links below.
|
|
|
|
|
|
# Version Links
|
|
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 the required version of GUT in the Asset Library.
|
|
|
|
You can download/clone earlier versions of GUT using the links below.
|
|
|
|
|GUT Version|Valid Godot Version|||||
|
|
|-|-|-|-|-|-|
|
|
|godot_4_7 branch|4.7.x|[repo](https://github.com/bitwes/Gut/tree/godot_4_7)|[download](https://github.com/bitwes/Gut/archive/refs/heads/godot_4_7.zip)|||
|
|
|Main Branch |4.6.x| |[download](https://github.com/bitwes/Gut/archive/refs/heads/main.zip) | | [wiki](https://gut.readthedocs.io/en/latest/)|
|
|
|[9.6.0](https://github.com/bitwes/Gut/releases/tag/v9.6.0)|4.6.x|[repo](https://github.com/bitwes/Gut/tree/v9.6.0)|[download](https://github.com/bitwes/Gut/archive/refs/tags/v9.6.0.zip)|[Asset Library](https://godotengine.org/asset-library/asset/1709)|[wiki](https://gut.readthedocs.io/en/v9.6.0)|
|
|
|[9.5.0](https://github.com/bitwes/Gut/releases/tag/v9.5.0)|4.5.x|[repo](https://github.com/bitwes/Gut/tree/v9.5.0)|[download](https://github.com/bitwes/Gut/archive/refs/tags/v9.5.0.zip)||[wiki](https://gut.readthedocs.io/en/v9.5.0/)|
|
|
|[9.4.0](https://github.com/bitwes/Gut/releases/tag/v9.4.0)|4.3.x - 4.4.x|[repo](https://github.com/bitwes/Gut/tree/v9.4.0)|[download](https://github.com/bitwes/Gut/archive/refs/tags/v9.4.0.zip)||[wiki](https://gut.readthedocs.io/en/v9.4.0/)|
|
|
|[9.3.0](https://github.com/bitwes/Gut/releases/tag/v9.3.0)|4.2.x|[repo](https://github.com/bitwes/Gut/tree/v9.3.0)|[download](https://github.com/bitwes/Gut/archive/refs/tags/v9.3.0.zip)||[wiki](https://gut.readthedocs.io/en/9.3.1/)|
|
|
|[9.1.1](https://github.com/bitwes/Gut/releases/tag/v9.1.1)|4.1.x|[repo](https://github.com/bitwes/Gut/tree/v9.1.1)|[download](https://github.com/bitwes/Gut/archive/refs/tags/v9.1.1.zip)|||
|
|
|[9.0.1](https://github.com/bitwes/Gut/releases/tag/v9.0.1)|4.0.x|[repo](https://github.com/bitwes/Gut/tree/v9.0.1)|[download](https://github.com/bitwes/Gut/archive/refs/tags/v9.0.1.zip)|||
|
|
|[7.4.3](https://github.com/bitwes/Gut/releases/tag/v7.4.3)|3.5.x|[repo](https://github.com/bitwes/Gut/tree/v7.4.3)|[download](https://github.com/bitwes/Gut/archive/refs/tags/v7.4.3.zip)|[Asset Library](https://godotengine.org/asset-library/asset/54)|[wiki](https://gut.readthedocs.io/en/v7.4.2/)|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
# Features
|
|
* [Simple install](https://gut.readthedocs.io/en/latest/Install.html) via the Asset Library
|
|
* A plethora of [asserts and utility methods](https://gut.readthedocs.io/en/latest/Asserts-and-Methods.html) to help make your tests simple and concise
|
|
* Support for [Inner Test Classes](https://gut.readthedocs.io/en/latest/Inner-Test-Classes.html) to give your tests some extra context and maintainability
|
|
* Doubling: [Full](https://gut.readthedocs.io/en/latest/Doubles.html) and [Partial](https://gut.readthedocs.io/en/latest/Partial-Doubles.html), [Stubbing](https://gut.readthedocs.io/en/latest/Stubbing.html), [Spies](https://gut.readthedocs.io/en/latest/Spies.html)
|
|
* Command Line Interface [(CLI)](https://gut.readthedocs.io/en/latest/Command-Line.html)
|
|
* [Parameterized Tests](https://gut.readthedocs.io/en/latest/Parameterized-Tests.html)
|
|
* [Export results](https://gut.readthedocs.io/en/latest/Export-Test-Results.html) in standard JUnit XML format
|
|
|
|

|
|
|
|
|
|
|
|
|
|
# Getting Started
|
|
* [Install](https://gut.readthedocs.io/en/latest/Install.html)
|
|
* [Quick Start](https://gut.readthedocs.io/en/latest/Quick-Start.html)
|
|
* [Creating Tests](https://gut.readthedocs.io/en/latest/Creating-Tests.html)
|
|
* [Asserts and Methods](https://gut.readthedocs.io/en/latest/Asserts-and-Methods.html)
|
|
|
|
|
|
|
|
|
|
# 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.
|
|
* [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=bitwes.gut-extension)
|
|
* [Github repo](https://github.com/bitwes/gut-extension)
|
|
* [Quick tutorial on setup and use](https://youtu.be/pqcA8A52CMs)
|
|
|
|
|
|
Thanks for using GUT. If you'd like to support me you can [buy me a coffee](https://buymeacoffee.com/bitwes).
|
|
|
|
# License
|
|
Gut is provided under the MIT license. License is in `addons/gut/LICENSE.md`.
|