Skip to content
This repository was archived by the owner on May 18, 2026. It is now read-only.
This repository was archived by the owner on May 18, 2026. It is now read-only.

test: CLI test suite health summary and improvement roadmap #109

@jongio

Description

@jongio

Summary

The Go CLI test suite scores well overall (all source files have corresponding tests, good table-driven patterns, proper error path coverage), but several structural improvements would increase confidence and maintainability.

Findings

Coverage Score: Good (7.5/10)

Strengths:

  • 100% source file coverage — every .go file has at least one test file
  • Extensive table-driven tests with 8-15+ cases per function
  • Error paths well-tested (ValidationError, ScriptNotFoundError, InvalidShellError, ExecutionError)
  • Platform-specific tests properly gated with t.Skip()
  • No TODO/FIXME debt in test files
  • Good dependency injection for mocking (fakeExecutor, mock resolver)
  • Integration tests properly separated with build tags

Areas for Improvement:

Area Severity Details
Web E2E tests not in CI High 8 Playwright specs exist but are never run in CI
MCP server init untested Medium runMCPServer() has ~75 lines with no direct tests
Path traversal edge cases Medium Security-critical path validation lacks adversarial inputs
Boundary condition gaps Low Nil inputs, empty structs, special chars untested
Interactive stdin untested Low Stdin pipe attachment (executor.go:170) has no automated test

Test Infrastructure

  • Go tests: Well-structured with unit + integration separation
  • Playwright tests: Fully configured but not integrated into CI
  • No flaky tests detected: No sleep calls, proper skip annotations
  • Mocking: Uses dependency injection rather than monkey-patching

Related Issues Filed

Individual issues have been filed for the top findings above. See issues with the test-health label for details.

Metadata

Metadata

Assignees

No one assigned

    Labels

    automatedCreated by automationtest-healthTest suite health findings

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions