MikeSchulze / gdUnit4

A Godot Unit Test Framework. Support for GDScript and C# unit testing
MIT License
490 stars 28 forks source link
gdunit godot test-automation testing testing-tools unit-test unittest unittest-framework


GdUnit4 GitHub release (latest by date)

A Godot Embedded Unit Testing Framework

This version of GdUnit4 is based on Godot v4.2.1.stable.official [b09f793f5] (master branch)


Supported Godot Versions

Compatibility Overview

GdUnit4 Version Minimal required Godot Version
v4.3.2+v4.2.0, v4.3-beta2
v4.3.0, v4.3.1v4.2.0
v4.2.1-v4.2.5v4.1.0
v4.2.0 and olderv4.0

GitHub branch checks state

What is GdUnit4?

Gd(Godot)Unit(Unit Testing)4(Godot 4.x)

GdUnit4 is an embedded unit testing framework designed for testing Gd scripts, C# scripts, and scenes in the Godot editor. With GdUnit4, you can easily create and run unit tests to verify the functionality and performance of your code, ensuring that it meets your requirements and specifications.
GdUnit4 is a powerful tool that supports Test-Driven Development (
TDD), a popular software development approach that emphasizes creating automated tests before writing any code. By using GdUnit4 for TDD, you can ensure that your code is thoroughly tested and free of bugs, which can save you time and effort in the long run.

Main Features


Basic Test Example

class_name GdUnitExampleTest
extends GdUnitTestSuite

func test_example():
  assert_str("This is a example message")\
    .has_length(25)\
    .starts_with("This is a ex")

Documentation

How to Install GdUnit

API Documentation


You Are Welcome To


GdUnit Test Coverage and Code Quality

Test Coverage

GdUnit is comprehensively tested to ensure robust functionality.
Continuous Integration (CI) is in place for every pull request to prevent any potential functionality issues.

Code Formatting

🙏 Special Thanks to @Scony for creating gdlint, a valuable tool contributing to code quality.


Contribution Guidelines

Thank you for your interest in contributing to GdUnit4!
To ensure a smooth and collaborative contribution process, please review our contribution guidelines before getting started. These guidelines outline the standards and expectations we uphold in this project.

Code of Conduct: We strictly adhere to the Godot code of conduct in this project. As a contributor, it is important to respect and follow this code to maintain a positive and inclusive community.

Using GitHub Issues: We utilize GitHub issues for tracking feature requests and bug reports. If you have a general question or wish to engage in discussions, we recommend joining the GdUnit Discord Server for specific inquiries.

We value your input and appreciate your contributions to make GdUnit4 even better!


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

Join GdUnit Server

Thank you for supporting my project


Sponsors

bitbrain miguel a.k. bitbrain sebastianhutter Sebastian Hutter rafaelGuerreiro Rafael Guerreiro