sdcorejs-testing-philosophy

Standardize SDCoreJS test strategy with pyramid ratios and mocking boundaries.

2|Updated Apr 18, 2026
One-click install
npx skills add https://github.com/sdcorejs/sdcorejs-agent --skill sdcorejs-testing-philosophy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sdcorejs-testing-philosophy
Source: https://github.com/sdcorejs/sdcorejs-agent/tree/main/plugin/skills/sdcorejs-testing-philosophy
Command: npx skills add https://github.com/sdcorejs/sdcorejs-agent --skill sdcorejs-testing-philosophy

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Prevents weak or misleading test strategies by defining cross-track testing principles: test pyramid ratios, what to mock versus hit, when to write tests, and how to validate behavior instead of implementation.

Core Features & Use Cases

  • Test pyramid guidance: recommends Unit/Integration/E2E ratios and what each layer must cover for speed vs confidence.
  • Mocking vs hitting rules: clarifies which dependencies to mock (external services) and which to integrate (your owned DB/routers).
  • When to write tests: supports TDD (before code), test-as-you-build (during), and diff-scoped tests (after) with anti-patterns to avoid.
  • Arrange-Act-Assert structure and naming: enforces readable tests that express verified behavior and outcomes.
  • Behaviour vs implementation: discourages brittle assertions on private methods and internal state shape.

Quick Start

Use the sdcorejs-testing-philosophy skill when planning tests for a new feature so the test plan matches the intended behaviour, layer, and mocking boundaries.

Frequently Asked Questions about sdcorejs-testing-philosophy

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

FAQPage Schema
What is the ideal ratio of unit, integration, and e2e tests in a test pyramid?

An effective test pyramid relies on a broad base of fast unit tests, a smaller middle layer of integration tests, and minimal e2e tests. This distribution maximizes execution speed and confidence while minimizing brittle, slow-running top-layer failures.

How do I decide what to mock versus hit in integration testing?

In integration testing, you should mock external services to isolate your system, while hitting your owned databases and routers to validate real interactions. This approach ensures stable, meaningful tests without creating brittle dependencies on third-party systems.

When should I write tests during development?

You can write tests during development using disciplined timing: before code for TDD, during building for test-as-you-go, or after for diff-scoped tests. Avoid anti-patterns by ensuring tests always match intended behaviour and outcomes.

How do I stop brittle assertions on private methods and internal state?

To stop brittle assertions, adopt a behaviour-over-implementation testing approach that validates visible outcomes rather than private methods or internal state shape. Using Arrange-Act-Assert structure ensures readable tests expressing verified behaviour.

Does behaviour driven testing require an Arrange-Act-Assert structure?

Yes, behaviour driven testing requires an Arrange-Act-Assert structure to produce stable, meaningful tests. This structure enforces readable tests that clearly express verified behaviour and outcomes instead of focusing on implementation details.