Skip to content

Support for running tests with Godot GUT #29

@atcen

Description

@atcen

Thanks for this great project! I’d love to see support for Godot GUT (Godot Unit Test) integrated into godot-mcp.

Use case:
I want to run GUT tests via MCP, ideally in a way that the test results (pass/fail) can be captured and returned through the MCP server.

Why GUT:
GUT is the de facto standard for unit testing in Godot. It supports running tests from within the editor or headlessly via CLI, making it suitable for CI and automated workflows.

GUT CLI basics:
Tests can be executed like this:

godot --headless --script addons/gut/gut_cmdln.gd --path . -- tests/test_player.gd

Some relevant CLI options:

  • --headless: Runs Godot without GUI.
  • --script addons/gut/gut_cmdln.gd: Entrypoint for the GUT test runner.
  • --path .: Specifies the project path.
  • Final argument: Optional path(s) to specific test scripts or folders.

GUT outputs human-readable test results to stdout. With --json-report, it can also write a JSON file of test results:

godot --headless --script addons/gut/gut_cmdln.gd -- --json-report=report.json

Thanks a lot!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions