Skip to content

MCP test tool silently returns no output for most ZIO Test specsΒ #8276

@russwyte

Description

@russwyte

Description

The Metals MCP test tool silently returns no output for most ZIO Test specs, while some specs work correctly. Running the same tests via sbt testOnly works fine β€” all tests pass and produce output.

Reproduction

Repository: https://github.com/russwyte/mechanoid (branch: move-core-tests-to-core-package)

Works β€” returns full test output:

Silently returns no output (but all pass via sbt core/test):

All specs extend ZIOSpecDefault with the same test framework. Example MCP invocations:

// Works
test(testClass="mechanoid.core.FiniteMacroSpec", 
     testFile="core/src/test/scala/mechanoid/core/FiniteMacroSpec.scala", verbose=true)

// No output
test(testClass="mechanoid.core.FSMStateSpec",
     testFile="core/src/test/scala/mechanoid/core/FSMStateSpec.scala", verbose=true)

Running via sbt directly works for all:

sbt "core/testOnly mechanoid.core.RedactorSpec mechanoid.core.FSMStateSpec mechanoid.core.TransitionResultSpec"
# 20 tests passed. 0 tests failed. 0 tests ignored.

The working spec (FiniteMacroSpec) doesn't have any obvious structural difference from the failing ones.

Expected behavior

All test specs should produce output when invoked via the MCP test tool, consistent with sbt behavior.

Environment

  • Metals: 1.6.6 (also reproduced on 1.6.6+21-e70ead3d-SNAPSHOT)
  • Scala: 3.7.4
  • sbt: 1.12.0
  • ZIO: 2.1.24 (zio-test-sbt 2.1.24)
  • Test framework: zio.test.sbt.ZTestFramework (auto-detected; also tried explicit testFrameworks setting β€” no change)
  • OS: Linux (WSL2)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething that is making a piece of functionality unusablemodel-context-protocol

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions