mbauhardt / gdUnit3

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

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

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

About

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

License:MIT License


Languages

Language:GDScript 97.8%Language:HTML 0.9%Language:CSS 0.6%Language:C# 0.5%Language:GAP 0.1%Language:Batchfile 0.1%Language:Shell 0.1%