gdscript-test

minami110's avatarfrom minami110

Run GDUnit4 tests for Godot projects. Use after implementing features, fixing bugs, or modifying GDScript files to verify correctness.

⭐17stars🔀0forks📁View on GitHub🕐Updated Nov 28, 2025

When & Why to Use This Skill

This Claude skill streamlines the testing workflow for Godot engine projects by automating GDUnit4 test execution. It enables developers to efficiently verify GDScript logic, maintain code integrity during refactoring, and ensure robust game mechanics through comprehensive unit testing and detailed failure reporting, significantly enhancing the software quality assurance process.

Use Cases

  • Feature Verification: Automatically run unit tests immediately after implementing new game mechanics to confirm they function as intended and meet technical requirements.
  • Regression Testing: Execute the full test suite after fixing bugs or modifying GDScript files to ensure that changes haven't introduced new issues into existing systems.
  • Local CI/CD Validation: Use the skill to perform pre-commit checks and validate code correctness in a local environment before pushing updates to version control or automated pipelines.
  • Targeted Debugging: Run specific test files or directories in verbose mode to isolate, analyze, and resolve complex logic failures within specific modules of a Godot project.
nameGDScript Test
descriptionRun GDUnit4 tests for Godot projects. Use after implementing features, fixing bugs, or modifying GDScript files to verify correctness.

GDScript Test

Run GDUnit4 tests using the test wrapper script.

When to Use

  • After implementing new features
  • After fixing bugs
  • After modifying GDScript files
  • When you need to verify test coverage
  • When running CI/CD validation locally

Test Execution

Run All Tests

.claude/skills/gdscript-test-skill/scripts/run_test.sh

Runs all tests in tests/ directory with suppressed Godot logs (only shows failures).

Run Specific Test File

.claude/skills/gdscript-test-skill/scripts/run_test.sh tests/test_foo.gd

Run Multiple Tests

.claude/skills/gdscript-test-skill/scripts/run_test.sh tests/test_foo.gd tests/test_bar.gd

Run Tests in Directory

.claude/skills/gdscript-test-skill/scripts/run_test.sh tests/application/

Verbose Mode

.claude/skills/gdscript-test-skill/scripts/run_test.sh -v

Shows all Godot logs (useful for debugging test issues).

Understanding Results

Success

=================================================
ALL TESTS PASSED (X tests)
=================================================

Failure

=================================================
TEST FAILURES (X of Y tests failed)
=================================================

[1] TestClassName :: test_method_name
    File: tests/test_file.gd:42
    Expected: 'expected_value'
    Actual:   'actual_value'

Exit Codes

  • 0: All tests passed
  • 1: Some tests failed
  • 2: Error (e.g., report file not found)

Notes

  • Script automatically changes to project root before running tests
  • Test reports are saved in reports/ directory
  • Uses gdUnit4 framework (configured in project.godot)
  • Compatible with CI/CD environments