0
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill chen19007/my_skills --skill godot-test- SKILL.md5.8 KB
Overview
This skill runs GUT (Godot Unit Testing) tests for Godot projects and automates test execution for development and CI workflows. It provides command examples, common options, result interpretation, and guidance for writing GUT tests. Use it to quickly run all tests, target specific files or patterns, and produce machine-friendly exit codes for pipelines.
How this skill works
The skill invokes Godot's CLI with the GUT command-line runner (addons/gut/gut_cmdln.gd) and accepts options to select directories, files, test names, and log levels. It parses return codes and standard output so callers can detect passing or failing suites (0 = all passed, 1 = failures). It also documents common GUT options, test structure, assertions, and advanced features like parameterized tests and partial doubles.
When to use it
- Run the full test suite locally before merging code
- Verify specific feature tests after a code change
- Drive test-first development (TDD) while implementing features
- Integrate into CI/CD pipelines to fail builds on test failures
- Run targeted tests during debugging to reproduce issues
Best practices
- Install GUT in addons/gut and enable the plugin in project settings
- Name test files and methods descriptively using test_ prefix
- Keep tests isolated; clean up resources with queue_free() after each test
- Prefer single-assertion tests for clear failure signals
- Use is_equal_approx() for floating-point comparisons to avoid precision issues
Example use cases
- Run all tests: godot --path . -s addons/gut/gut_cmdln.gd -gexit
- Run a specific file: -gtest=res://test/test_player.gd -gexit
- Run tests matching a pattern: -gselect=player -gexit
- Produce verbose logs for debugging: -glog=3 -gexit
- Fail CI job on test failures by checking Godot exit code
FAQ
Godot returns 0 when all tests pass and 1 when any test fails.
Where should I install GUT in my project?
Place the plugin under addons/gut and enable it in the project settings, or git clone into addons.
How do I run a single test method?
Use -gunit_test_name=<name> or structure tests so you can target the method by name with selection options.