Skip to content

Latest commit

 

History

History
148 lines (104 loc) · 3.67 KB

index.rst

File metadata and controls

148 lines (104 loc) · 3.67 KB
.. toctree::
   :hidden:
   :maxdepth: 3
   :caption: Getting Started
   :name: sec-started

   New-For-Godot-4
   Install
   Quick-Start
   Command-Line


.. toctree::
   :hidden:
   :caption: GutTest
   :name: sec-guttest

   Creating-Tests
   Asserts-and-Methods
   Awaiting
   Inner-Test-Classes
   Parameterized-Tests
   Simulate
   Comparing-Things


.. toctree::
   :hidden:
   :maxdepth: 1
   :caption: Doubling
   :name: sec-doubles

   Doubles
   Partial-Doubles
   Double-Strategy
   Stubbing
   Spies


.. toctree::
   :hidden:
   :maxdepth: 1
   :caption: Mocking Input
   :name: sec-mockinput

   Mock-Input
   Input-Factory



.. toctree::
   :hidden:
   :maxdepth: 1
   :caption: Other
   :name: sec-other

   Contributing
   Export-Test-Results
   Hooks
   Memory-Management
   Orphans
   Running-On-Devices
   Tutorials


Gut 7.4.2 (Godot 3.x)

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.

Getting Started

Advanced Testing

Editor GUI

_static/images/gut_panel.png

GUT GUI

_static/images/GutGui.png

  1. Output Box.
  2. List of Test Scripts. Inner Classes are indented under scripts.
  3. Progress bars for all scripts and the current script.
  4. Log Level slider.
  5. Previous Script (in list of scripts)
  6. 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.
  7. Next Script (in list of scripts)
  8. 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.
  9. Toggle display of List of Test Scripts
  10. The Hamburger button. It shows some additional options.
  11. Continue button will be enabled if a call to yield_before_teardown occurs. Click it to continue running tests.
  12. 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.

Engine Warnings

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.

_static/images/exclude_addons.png

License

Gut is provided under the MIT license. [The license is distributed with Gut so it is in the addons/gut folder](https://github.com/bitwes/Gut/blob/master/addons/gut/LICENSE.md).

Contributing

:doc:`Contributing <Contributing>`

Indices and tables