GdUnit4
GdUnit4 is an embedded unit testing framework for Godot Engine, supporting GdScript and C# with features like test discovery, fluent syntax, mocking, and continuous integration support. It allows developers to write and execute unit tests directly within the Godot editor.
https://github.com/MikeSchulze/gdUnit4Preview Images


GdUnit4: Comprehensive Unit Testing for Godot Engine
GdUnit4 is a powerful unit testing framework seamlessly integrated into the Godot Engine, designed to streamline the testing process for both GDScript and C# scripts. It supports Test-Driven Development (TDD) by enabling developers to create automated tests before writing code, ensuring robust and bug-free applications.
Key Features
- Embedded Test Inspector: Navigate test suites effortlessly within the Godot editor.
- Test Discovery: Automatically identify and add tests at runtime.
- Fluent Syntax: Write readable and maintainable test cases.
- Mocking and Spying: Simulate behavior and verify function calls.
- Scene Runner: Simulate user inputs like mouse clicks and keyboard actions.
- Continuous Integration: Supports command-line execution, HTML and JUnit XML reports, and GitHub Actions integration.
- Flaky Test Handling: Detects and manages non-deterministic test failures by rerunning tests.
Supported Godot Versions
GdUnit4 supports a range of Godot versions, ensuring compatibility across different projects. The latest version is compatible with Godot v4.4.stable.mono.official. Refer to the compatibility overview for details on specific versions.
By leveraging GdUnit4, developers can enhance code quality, reduce debugging time, and build more reliable Godot games and applications.