gdUnit3
gdUnit3 copied to clipboard
A Godot Unit Test Framework. Support for gdScript and c# unit testing
GdUnit3
A Godot Embedded Unit Testing Framework
What is GdUnit3
GdUnit3 is a framework for testing Gd-Scrips/C# and Scenes within the Godot editor. GdUnit3 is very useful for test-driven development and will help you get your code bug-free.
Features
- Fully embedded in the Godot editor
- Run test-suite(s) by using the context menu on FileSystem, ScriptEditor or GdUnitInspector
- Create tests directly from the ScriptEditor
- Configurable template for the creation of a new test-suite
- A spacious set of Asserts use to verify your code
- Argument matchers to verify the behavior of a function call by a specified argument type.
- Fluent syntax support
- Test Fuzzing support
- Mocking a class to simulate the implementation in which you define the output of the certain function
- Spy on an instance to verify that a function has been called with certain parameters.
- Mock or Spy on a Scene
- Provides a scene runner to simulate interactions on a scene
- Simulate by Input events like mouse and/or keyboard
- Simulate scene processing by a certain number of frames
- Simulate scene processing by waiting for a specific signal
- Update Notifier to install the latest version from GitHub
- Command Line Tool
- CI - Continuous Integration support
- generates HTML report
- generates JUnit report
- With v2.0.0 C# testing support (beta)
Short Example
# this assertion succeeds
assert_int(13).is_not_negative()
# this assertion fails because the value '-13' is negative
assert_int(-13).is_not_negative()
Documentation
You are welcome to: