Home
Softono
gdUnit3

gdUnit3

Open source MIT GDScript
319
Stars
22
Forks
0
Issues
5
Watchers
1 year
Last Commit

About gdUnit3

GdUnit3 is a unit testing framework embedded in the Godot game engine editor for testing GDScript and C code as well as Scenes. It supports test-driven development and helps developers write bug-free code. Note that GdUnit3 is out of maintenance with no new features or bug fixes, and development continues with GdUnit4. Features include running test suites from the FileSystem, ScriptEditor, or GdUnitInspector context menus, creating tests directly from the ScriptEditor, configurable test templates, a comprehensive set of assertions, argument matchers, fluent syntax, test fuzzing support, parameterized tests, mocking and spying on classes and scenes, a scene runner for simulating keyboard and mouse input, and signal/frame-based simulation. Additional capabilities include an update notifier, command line tool, CI support with HTML and JUnit reports, full C testing support, and a Visual Studio Code extension.

Platforms

Web Self-hosted

Languages

GDScript

Links

GdUnit3 GitHub release (latest by date)

A Godot Embedded Unit Testing Framework


GitHub branch checks state

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.

Note

- GdUnit3 is Now in out of Maintenance!

Meaning that NO new features will be added and NO bug fixes will be made.
The development of GdUnit continues with
GdUnit4, which is designed for use with Godot4.

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
  • Parameterized Tests (Test Cases)
  • 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.3.0 full C# testing support
  • Visual Studio Code extension

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

How to Install GdUnit

API Documentation


You are welcome to:

GitHub issues GitHub closed issues
GitHub top language GitHub code size in bytes

Join GdUnit3 Server

Thank you for supporting my project!


Sponsors:

  • musicm122 - musicm122
  • Curt King -