• Stars
    star
    265
  • Rank 154,577 (Top 4 %)
  • Language GDScript
  • License
    MIT License
  • Created almost 4 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Godot Unit Test Framework. Support for gdScript and c# unit testing

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 Maintenance Mode!

Meaning that no new features will be added and only 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 -