Testing Framework
This page describes the preferred testing approach for this project.
Test Coverage
Section titled “Test Coverage”Grid Building 5.0.0 includes a comprehensive test suite with 1540 tests passing at 100%, covering:
- 1410 plugin tests - Core plugin functionality:
- Unit tests for core utilities and systems
- Integration tests for system interactions
- Placement rule validation tests
- Indicator generation and management tests
- 130 demo and miscellaneous tests - Demo scenes, workflows, and edge cases:
- Demo scene structure and integrity tests
- Complete user workflow validation
- Cross-system integration scenarios
📖 View the complete test suite - Public repository with all test cases and validation logic.
Preferred framework
Section titled “Preferred framework”- GdUnit is the preferred test framework for testing plugin classes and game logic.
- The Godot development project in this repo contains a GdUnit-based suite with scene runners and input simulations.
Running tests
Section titled “Running tests”- Use the provided scripts and VS Code tasks to run tests. See the workspace tasks for “Run GdUnit Test” or demo test runners.
- Tests are organized by feature (placement, targeting, rules, indicators) and include scene fixtures for fast iteration.
Writing tests
Section titled “Writing tests”- Favor small, focused tests per class or rule; add scene-level tests for integration flows like the placement chain.
- Assert on validation outcomes and signals, not implementation details; use the public API and contract of each class.
See also: