gdunit4

Automate unit and integration testing for Godot 4.6 C# projects.

Updated Apr 18, 2026
One-click install
npx skills add https://github.com/Zearain/ludum-dare-59 --skill gdunit4
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gdunit4
Source: https://github.com/Zearain/ludum-dare-59/tree/main/.opencode/skills/gdunit4
Command: npx skills add https://github.com/Zearain/ludum-dare-59 --skill gdunit4

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

GdUnit4 provides a comprehensive framework to implement and run unit and integration tests for Godot 4.6 C# projects, bridging Godot's editor environment with .NET testing workflows.

Core Features & Use Cases

  • Embedded test framework for Godot 4.x with C#
  • Lifecycle hooks ([Before]/[After]/[BeforeTest]/[AfterTest]) for setup and teardown
  • Fluent assertions via GdUnit4 to cover health checks, type and collection assertions
  • Signal assertions and tests requiring scene graph interactions
  • Scene runner integration testing for end-to-end validation
  • Parameterized tests and orphan node management
  • Moq integration for mocking C# dependencies in tests
  • Clear guidance on test organization, naming conventions, and test isolation

Quick Start

Install GdUnit4 in your Godot 4.6 project and create a basic test class to validate a component.

Frequently Asked Questions about gdunit4

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write C# unit tests for Godot 4?

C# unit testing for Godot 4 uses GdUnit4 to automate test suite creation with lifecycle hooks, fluent assertions, and scene runner integration. It bridges the Godot editor with .NET testing workflows to validate components.

Can I test Godot signals and scene interactions in C#?

Testing Godot signals and scene graph interactions in C# is fully supported by GdUnit4. It provides specialized signal assertions and a scene runner for end-to-end integration testing of node behaviors.

Does GdUnit4 support mocking dependencies in Godot C# tests?

GdUnit4 supports mocking C# dependencies in Godot tests using Moq. This allows you to isolate components during unit testing by substituting external dependencies with mock objects.

What do I need to set up Godot C# integration testing?

Godot C# integration testing requires a Godot 4.6 project, a .NET test project, and familiarity with GdUnit4 conventions. You must install GdUnit4 in your project and create test classes to validate components.

How do I manage orphan nodes during Godot unit tests?

Managing orphan nodes during Godot unit tests is handled automatically by GdUnit4. The framework includes orphan node management to clean up the scene graph and ensure test isolation across lifecycle hooks.