GdUnit3 is a framework for testing GdScrips and Scenes within the Godot editor. GdUnit3 is very useful for test-driven development and will help you get your code bug-free.
- Fully integrated in the Godot editor
- Run test-suite(s) by using the context menu on FileSystem, ScriptEditor or GdUnitInspector
- Create test's directly from the ScriptEditor
- 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 which you define the output of certain function
- Spy on a 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 proccessing by waiting for a specific signal
- Update Notifier to install latest version from GitHub
- Command Line Tool [[Command-Line-Tool]]
# this assertion succeeds
assert_int(13).is_not_negative()
# this assertion fail because the value '-13' is negative
assert_int(-13).is_not_negative()
You have to install the GdUnit3 plugin over the AssetLib in the Godot Editor.
- Select the tab AssetLib in the middle on the top
- Enter GdUnit3 in the search bar
- Select GdUnit3 and press the install button
- Finally you have to activate the plugin
- Choose Project->Project Settings, click the Plugins tab and activate GdUnit.
- After activation the GdUnit3 inspector is displayed in the top left
- Done, GdUnit is ready to use
You are welcome to report bugs or create new feature requests. I would also appreciate feedback.