Skip to content

[MEDIUM] run_tests reports Success before confirming the TestRunner run actually started #99

Description

@Daliys

Problem

run_tests returns status: Success immediately after invoking TestRunnerApi.Execute, even though Unity test execution is asynchronous.

Evidence

  • Editor/MCPServerMethods.Editor.cs:81-82 invokes Execute via reflection.
  • Editor/MCPServerMethods.Editor.cs:84-91 immediately returns Success and Test run triggered.
  • Actual results are collected later through the test-results path, so this response only proves the reflection call did not throw synchronously.

Impact

If a run is already in progress, queued, ignored, or fails asynchronously, the RPC still reports success. Clients must infer failure later by polling and timing out.

Suggested fix

Return a more precise status such as Submitted, register a callback/marker that confirms the run started, or surface a clear already running failure when Unity exposes that state.

Source report

Imported from audit report item: Editor/MCPServerMethods.Editor.cs:84.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds-triageImported or reported issue awaiting owner reviewpriority: mediumImportant defect or workflow gap with workaroundsurface: testsTest runner, test windows, or verification helperssurface: unity-editorUnity Editor package, windows, menus, or C# server surfacetype: correctnessIncorrect result, bad validation, or misleading success/failure behavior

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions