Skip to main content

Overview

The sunpeak test command runs automated tests for your MCP server. It supports E2E tests against the inspector, visual regression, live tests against real hosts, and multi-model evals.
With no flags, sunpeak test runs unit tests (Vitest, if configured) and E2E tests (Playwright). For standalone testing framework projects, only E2E tests run because unit tests aren’t scaffolded. For sunpeak app framework projects, both unit and E2E tests run by default. Live tests and evals are never included in the default run because they require API keys and cost money.

Options

Flags are additive: --e2e --live --eval runs all three. --visual implies --e2e. --update implies --visual. Extra arguments are passed through to the underlying test runner (Playwright or Vitest):

Subcommands

sunpeak test init

Scaffold test infrastructure for an existing MCP server (not built with sunpeak):
This generates:
  • tests/e2e/ with example Playwright specs and config
  • tests/simulations/ with example simulation JSON fixtures
  • tests/evals/ with eval config, .env.example, and example eval specs
  • tests/live/ with live test config and example specs
For sunpeak framework projects, sunpeak new scaffolds all of this automatically.

Examples

See Also

E2E Testing

Write Playwright tests against simulated hosts.

Visual Regression

Screenshot comparison and baseline management.

Live Testing

Test against real ChatGPT.

Evals

Multi-model tool calling tests.