Skip to content
Agentmart
Submit a tool

testing-strategy

Test pyramid and testing strategy — unit, integration, and end-to-end test ratios, mocking strategies, test isolation, and what to test.

Skill by Claude-Code-Community-Ireland

IndexedMIT★ 11
Write a review

Chalk Labs

Need help deploying testing-strategy?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/claude-code-community-ireland-testing-strategy

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Test pyramid and testing strategy — unit, integration, and end-to-end test ratios, mocking strategies, test isolation, and what to test. Reference when planning test coverage or evaluating test quality.

Use cases: testing

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/testing-strategy

What's inside

Skill name
testing-strategy
Description
Test pyramid and testing strategy — unit, integration, and end-to-end test ratios, mocking strategies, test isolation, and what to test. Reference when planning test coverage or evaluating test quality.
License
MIT
Instructions
259 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Testing Strategy

## Test Pyramid

```
        /  E2E  \          ~10% — Slow, brittle, expensive
       /  Integ  \         ~20% — Medium speed, real dependencies
      /   Unit    \        ~70% — Fast, isolated, numerous
     /______________\
```

| Layer       | Count  | Speed     | Scope                        | Runs           |
|-------------|--------|-----------|------------------------------|----------------|
| Unit        | ~70%   | < 10ms   | Single function or class     | Every commit   |
| Integration | ~20%   | < 5s     | Multiple components together | Every push     |
| E2E         | ~10%   | < 60s    | Full user workflow           | Pre-merge, CI  |

If the pyramid inverts (more E2E than unit), treat it as a structural problem.

## Unit Test Principles

### FIRST Properties

| Property            | Rule                                                       |
|---------------------|------------------------------------------------------------|
| **Fast**            | Entire unit suite runs in under 30 seconds                 |
| **Isolated**        | No test depends on another test's execution or state       |
| **Repeatable**      | Same result every run, regardless of time, network, or OS  |
| **Self-validating** | Pass or fail with no manual inspection needed              |
| **Timely**          | Written before or alongside the production code            |

### What to Unit Test

- [ ] Pure functions and their edge cases
- [ ] Business logic and calculations
- [ ] State transitions and validation rules
- [ ] Data transformations and mappings
- [ ] Error handling paths
- [ ] Boundary conditions (empty, null, max, min, off-by-one)

### What NOT to Unit Test

- [ ] Framework configuration or boilerplate
- [ ] Simple getters/setters with no logic
- [ ] Third-party library internals
- [ ] Private methods directly (test through public interface)

### Arrange-Act-Assert

```typescript
describe("calculateDiscount", () => {
  it("applies 10% discount for orders over $100", () => {
    // Arrange
    const order = { items: [{ price: 120, quantity: 1 }] };
    // Act
    const result = calculateDiscount(order);
    // Assert
    expect(result.discount).toBe(12);
    expect(result.total).toBe(108);
  });
});
```

```python
class TestCalculateDiscount:
    def test_applies_10_percent_for_orders_over_100(self):
        order = Order(items=[Item(price=120, quantity=1)])
        result = calculate_discount(order)
        assert result.discount == 12
        assert result.total == 108
```

## Integration Test Scope

| Category            | Example                                               |
|---------------------|-------------------------------------------------------|
| Database queries    | Repository methods with a real (test) database        |
| API endpoints       | HTTP request through middleware, handler, and response |
| External services   | Calls to third-party APIs with sandboxed accounts     |
| Message queues      | Publish and consume cycle with real broker             |
| File system         | Read/write operations with temp directories           |
| Cache layers        | Cache set, get, invalidation with real cache           |

```typescript
describe("UserRepository", () => {
  let db: Database;
  beforeAll(async () => { db = await createTestDatabase(); await db.migrate(); });
  afterAll(async () => { await db.close(); });
  beforeEach(async () => { await db.truncateAll(); });

  it("finds user by email", async () => {
    await db.insert("users", { email: "test@example.com", name: "Test User" });
    const user = await userRepo.findByEmail("test@example.com");
    expect(user).not.toBeNull();
    expect(user.name).toBe("Test User");
  });
});
```

### Integration Test Rules

- [ ] Use a dedicated test database, never production data
- [ ] Reset state between tests (truncate tables, clear queues)
- [ ] Use test containers or in-memory databases where possible
- [ ] Test the happy path and the most critical error paths

## E2E Test Selection Criteria

**Include:** Critical revenue paths (signup, checkout, payment), authentication flows, core user journeys (3-5 things your product must do), cross-system workflows.

**Exclude:** Edge cases (cover in unit tests), UI-only validation, admin features, scenarios covered by lower-level tests.

```typescript
test("user can complete checkout", async ({ page }) => {
  await page.goto("/login");
  await page.fill('[name="email"]', "user@test.com");
  await page.fill('[name="password"]', "password123");
  await page.click('button[type="submit"]');
  await page.goto("/products/widget-1");

From Claude-Code-Community-Ireland/claude-code-resources, MIT.

More from Claude-Code-Community-Ireland/claude-code-resources

Signals

Stars
11
Forks
4
Open issues
4
Last commit (this folder)
Jan 29, 2026 (9 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from Claude-Code-Community-Ireland

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get testing-strategy running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying testing-strategy?

CallGet help
Cite this page

testing-strategy skill. Agent Mart. https://agentmart.dev/skills/claude-code-community-ireland-testing-strategy (last updated 2026-10-24)