gdUnit4
GdUnit4 is an embedded unit testing framework for Godot 4 that lets you write and run tests directly in the editor for GDScript and C# code. It supports test-driven development with features like mocking, scene testing, and CI/CD integration.
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Repository | godot-gdunit-labs/gdUnit4 |
| Owner | godot-gdunit-labs |
| Primary language | GDScript |
| License | MIT — OSI-approved |
| Stars | 1.1k |
| Forks | 67 |
| Open issues | 11 |
| Latest release | v6.1.3 (2026-04-27) |
| Last updated | 2026-07-03 |
| Source | https://github.com/godot-gdunit-labs/gdUnit4 |
What gdUnit4 is
GdUnit4 provides a fluent assertion API, parameterized/fuzzy testing, scene runner for input simulation, mock/spy capabilities, and command-line tooling for CI pipelines. It integrates tightly with Godot 4.3–4.7.1-rc1 and generates JUnit XML and HTML reports.
Get the gdUnit4 source
Clone the repository and explore it locally.
git clone https://github.com/godot-gdunit-labs/gdUnit4.gitcd gdUnit4# follow the project's README for install & configurationNeed it deployed, integrated, or customized instead? DEV.co ships production installs.
Best use cases
Implementation considerations
- Requires compatible Godot version (v6.1.3 supports v4.5–v4.6.3; master branch supports v4.7.1-rc1). Pin version compatibility early.
- C# support requires separate gdUnit4Net package and VSTest adapter setup; GDScript tests work out-of-box in editor.
- Scene testing via SceneRunner requires understanding of Godot's input event system and signal propagation for accurate test logic.
- Flaky test retry configuration and fuzzing parameters should be tuned per project to balance coverage and test execution time.
- Test templates are customizable but require understanding GdUnit4's code generation conventions.
When to avoid it — and what to weigh
- You need tests for Godot 3.x projects — GdUnit4 only supports Godot 4.x. Legacy Godot 3 projects require a different testing solution or migration.
- You require a non-permissive commercial license — MIT license permits commercial use, but any custom modifications to the framework itself remain under MIT. Verify alignment with your IP strategy.
- Your team has no GDScript or C# experience — The framework assumes familiarity with GDScript/C# and Godot conventions. Steep learning curve without prior Godot exposure.
- You need performance or load testing at scale — GdUnit4 is optimized for unit and integration tests, not large-scale load or stress testing scenarios.
License & commercial use
MIT License (MIT). Permissive open-source license allowing use, modification, and distribution in proprietary and commercial projects, with preservation of copyright notice and license text.
MIT license permits commercial use of GdUnit4 without royalties or licensing fees. However, any modifications to the framework itself remain under MIT. Verify internal IP policies if you plan to fork or extensively customize the codebase. For third-party integration or support, consult the Patreon or contact maintainers directly.
DEV.co evaluation signals
Editorial assessment — not user reviews. Directional, with an explicit confidence level.
| Signal | Assessment |
|---|---|
| Maintenance | Active |
| Documentation | Strong |
| License clarity | Clear |
| Deployment complexity | Low |
| DEV.co fit | Good |
| Assessment confidence | High |
No exploit details provided. GdUnit4 is a testing framework operating within the Godot editor and game runtime—it does not expose external network services or handle sensitive data inherently. Verify that test fixtures and mocks do not inadvertently leak credentials or secrets; standard code review practices apply. No known CVEs reported in data.
Alternatives to consider
Gut (Godot Unit Test)
Earlier Godot testing framework; lighter weight but less feature-rich (fewer assertions, no built-in mocking). Suitable for simpler test suites or legacy Godot 3.x projects.
UT.Boom (Godot 4)
Minimal, zero-dependency test framework for Godot 4. Faster setup and smaller footprint; trade-off is manual assertion writing and fewer conveniences.
WAT (Godot Add-on)
Another Godot testing framework with different assertion syntax and scene testing approach. Community-supported but less active than GdUnit4.
Build on gdUnit4 with DEV.co software developers
GdUnit4 integrates directly into the Godot editor and supports your full development workflow—from TDD to CI/CD. Start with the official documentation or explore community examples on GitHub.
Talk to DEV.coRelated open-source tools
Surfaced by semantic similarity across the DEV.co open-source index.
Related on DEV.co
Explore the category and the services that help you build with it.
gdUnit4 FAQ
Does GdUnit4 work with Godot 3.x?
Can I run tests outside the Godot editor?
What is the difference between mocking and spying?
Is GdUnit4 suitable for performance/load testing?
Custom software development services
DEV.co helps companies turn open-source tools like gdUnit4 into production software. Our software development services cover the full lifecycle — architecture, web development, integration, and maintenance — delivered by software developers and web developers who ship. Engage our software development agency to implement or customize it for your open-source testing stack.
Ready to add testing to your Godot project?
GdUnit4 integrates directly into the Godot editor and supports your full development workflow—from TDD to CI/CD. Start with the official documentation or explore community examples on GitHub.