agentfront/frontmcp/frontmcp-testing
Claude Code and agent skill by agentfront/frontmcp
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"},{"type":"config","description":"Configuration overrides"}]
Checking that the SKILL.md file is still in the repository.
Use for anything about testing FrontMCP servers: writing or running unit, integration, and E2E tests and reaching the 95%+ coverage bar. Covers Jest setup and coverage gating; unit-testing a ToolContext execute() with mock context, inputs, and Zod schema validation; testing resources and prompts; in-memory testing via create() and connectOpenAI / connectClaude (no HTTP); full MCP-protocol E2E over HTTP with McpTestClient and TestServer; authenticated tests with TestTokenFactory, MockOAuthServer, and role-based access; browser-bundle validation with Playwright; and CLI-binary / SEA startup tests. Triggers: write tests, run tests, add e2e tests, improve coverage, test a tool / resource / prompt, mock auth, jest config. The skill for ALL testing needs.
Install
npx vskill@latest install agentfront/frontmcp/frontmcp-testingSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as agentfront/frontmcp/frontmcp-testing.
FrontMCP Testing Router
Entry point for testing FrontMCP applications. This skill helps you navigate testing strategies across component types and find the right patterns for unit, integration, and E2E tests.
When to Use This Skill
Must Use
- Setting up testing infrastructure for a new FrontMCP project
- Deciding how to test a specific component type (tool, resource, prompt, agent)
- Planning a testing strategy that covers unit, E2E, and coverage requirements
Recommended
- Looking up testing patterns for a component type you haven't tested before
- Understanding the relationship between unit tests, E2E tests, and coverage thresholds
- Troubleshooting test failures or coverage gaps
Skip When
- You need detailed Jest configuration and test harness setup (go directly to
setup-testing) - You need to build components, not test them (see
frontmcp-development) - You need to deploy, not test (see
frontmcp-deployment)
Decision: Use this skill for testing strategy and routing. Open thesetup-testingreference underreferences/for hands-on Jest configuration and test writing.
Prerequisites
- A FrontMCP project with at least one component to test (see
frontmcp-development). - Jest installed and configured — if not, start with
setup-testingbefore opening any other testing skill. - The component itself implemented and exported; tests reach decorated classes through the SDK, not by importing internal builders.
Steps
This is a router skill. Follow this order to pick a testing approach, then move to the target reference under references/.
- Pick the test layer — unit (fastest, mock DI), integration (real DI scope), or E2E (real MCP client + server). Use the Testing Strategy table below.
- Pick the component flavour — tool / resource / prompt / agent / job — each has a distinct recipe.
- Pick the runtime concern — auth, browser/CLI build, direct vs streamable transport — and add the matching reference to your reading list.
- Open the target reference (e.g.
references/test-tool-unit.md,references/test-e2e-handler.md,references/test-auth.md) and follow its Steps section. - Enforce coverage — confirm the project's 95%+ thresholds are wired into Jest before merging (see
references/setup-testing.md).
Scenario Routing Table
| Scenario | Reference / Section | Description | |
|---|---|---|---|
| Set up Jest, coverage, and test harness | setup-testing | Full Jest config, test utilities, and coverage thresholds | |
| Write unit tests for a tool | test-tool-unit | Mock DI, validate input/output, test error paths | |
| Write unit tests for a resource | setup-testing (Unit Testing) | Test URI resolution, template params, read results | |
| Write unit tests for a prompt | setup-testing (Unit Testing) | Test argument handling, message generation | |
| Write E2E protocol-level tests | setup-testing (E2E Testing) | Real MCP client/server, full protocol flow | |
| Test authenticated endpoints | test-auth | E2E with OAuth tokens, session validation, role-based access | |
| Test deployment builds | setup-testing + deploy-to-* | Smoke tests against built output | |
| Test browser builds | test-browser-build | Smoke-test a frontmcp build --target browser bundle (import the bundle, optional Playwright suite) | |
| Test CLI binary builds | test-cli-binary | Spawn-and-curl smoke tests for frontmcp build --target cli artifacts | |
| Test with the direct API client | test-direct-client | In-memory testing via create(), connectOpenAI(), connectClaude() (no HTTP) | |
| Write E2E test handler patterns | test-e2e-handler | Manual McpTestClient + TestServer E2E patterns (alternative to fixture API) | |
| Unit test individual tools | test-tool-unit | Unit testing individual ToolContext subclasses with a mock context | |
| Catch regressions with recorded calls | replay-calls | Record calls with CallRecorderPlugin; replay with replaySession() or frontmcp test --replay |
Testing Strategy by Component Type
| Component | Unit Test Focus | E2E Test Focus | Key Assertions | |
|---|---|---|---|---|
| Tool | Input validation, execute logic, error paths, DI mocking | tools/call via MCP client | Output matches schema, errors return MCP codes | |
| Resource | URI resolution, read content, template param handling | resources/read via MCP client | Content type correct, URI patterns resolve | |
| Prompt | Argument validation, message generation, multi-turn | prompts/get via MCP client | Messages match expected structure | |
| Agent | LLM config, tool selection, handoff logic | Agent loop via MCP client | Tools called in order, result synthesized | |
| Provider | Lifecycle hooks, factory output, singleton behavior | createContainer(), or via tool/resource tests | Instance reuse, onShutdown() on dispose() | |
| Job | Progress tracking, retry logic, attempt counting | Job execution via test harness | Progress events emitted, retries respected | |
| Workflow | Step dependencies, conditions, input mapping functions | Workflow run via test harness | Steps execute in order, conditions evaluated, continueOnError respected | |
| Skill | Instruction loading (inline/file/url), tool validation | Skill discovery via MCP/HTTP | Instructions resolve, tool refs validated per toolValidation mode | |
| Plugin | Context extensions, provider registration, hook firing | Indirectly via tool tests | Extensions available on this, hooks fire at correct stages |
Cross-Cutting Testing Patterns
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckinglibs/skills/catalog/frontmcp-testing/SKILL.md
Popularity
- Repository stars
- 147
- Repository forks
- 6
- 7-day trend score
- 25
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 20 Aug 2026, 3 months ago.
Extension points
hookPre/post lifecycle hooksconfigConfiguration overrides
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/agentfront/frontmcp/frontmcp-testing)