testing

Define hermetic testing methodology for Connect RPC and Forge scaffolded services.

4|1|Updated Apr 12, 2026
One-click install
npx skills add https://github.com/reliant-labs/forge --skill testing-reliant-labs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing
Source: https://github.com/reliant-labs/forge/tree/main/internal/templates/project/skills/forge/testing
Command: npx skills add https://github.com/reliant-labs/forge --skill testing-reliant-labs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Testing strategy often drifts into flaky, slow, or low-signal test suites that waste CI time and still miss real regressions.

Core Features & Use Cases

  • Library-first test vocabulary (pkg/tdd): standardize table-driven RPC, contract, and E2E harness usage so scaffolded tests follow consistent patterns.
  • Test pyramid guidance: choose Unit, Integration, or E2E deliberately to balance speed, coverage, and realism.
  • Mock vs real decision framework: enforce the boundary rule so you mock external edges while keeping the system under test real.
  • Flakiness prevention rules: replace sleeps with polling, isolate state per test, and ensure deterministic assertions and diagnostics.

Quick Start

Use the testing skill to decide whether a new test should be unit, integration, or E2E and to apply the mock-versus-real boundary rule for that specific scenario.

Frequently Asked Questions about testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent flaky integration tests and intermittent failures in Go?

Prevent flaky integration tests by replacing static sleeps with polling, isolating state per test, and enforcing determinism and async-wait practices. This testing strategy replaces unpredictable delays with reliable hermetic tests that produce consistent assertions and diagnostics.

When should I use unit tests versus integration or e2e tests?

Use the test pyramid guidance to deliberately choose unit, integration, or e2e tests based on balancing speed, coverage, and realism. Unit tests validate isolated logic, while integration and e2e layers validate Connect RPC handlers and multi-service flows created by Forge scaffolders.

What is the mock-at-boundaries discipline for testing strategy?

The mock-at-boundaries discipline enforces mocking external edges while keeping the system under test real. This framework ensures you mock network or service boundaries to maintain hermetic test environments without sacrificing the realism of core business logic validation.

How do I standardize table-driven tests for Connect RPC handlers?

Standardize table-driven tests for Connect RPC handlers by adopting Forge's `pkg/tdd` helpers. This library-first test vocabulary provides consistent harness usage so scaffolded contract and handler tests follow uniform patterns and reduce structural drift across the codebase.

Why does my testing suite have low signal and miss real regressions?

Low signal and missed regressions often occur when tests drift into slow, flaky patterns without deliberate layering. Applying a consistent testing methodology across unit, integration, and e2e layers increases signal and ensures reliable coverage without wasting CI time.

Can I use this testing methodology for multi-service flows generated by Forge?

Yes, this testing methodology directly applies to multi-service flows created by Forge scaffolders and generators. It provides specific guidance for Connect RPC handler tests, contract service tests, and end-to-end flows to ensure reliable hermetic tests across generated services.