Get the FREE Ultimate OpenClaw Setup Guide →

testing

npx machina-cli add skill Fujigo-Software/f5-framework-claude/testing --openclaw
Files (1)
SKILL.md
3.4 KB

Testing Skills

Overview

Comprehensive testing knowledge for building reliable, maintainable software with confidence in deployments.

Categories

Fundamentals

  • Testing Pyramid
  • Test-Driven Development (TDD)
  • Behavior-Driven Development (BDD)
  • Core Testing Principles

Unit Testing

  • Test isolation and independence
  • Mocking and stubbing strategies
  • Test doubles (mocks, stubs, spies, fakes)
  • Effective assertions

Integration Testing

  • Database integration tests
  • API endpoint testing
  • External service testing
  • Container-based testing

End-to-End Testing

  • Browser automation
  • Mobile app testing
  • Visual regression testing
  • Cross-browser testing

Test Patterns

  • Arrange-Act-Assert (AAA)
  • Given-When-Then
  • Test fixtures and factories
  • Page Object Model

Advanced Testing

  • Property-based testing
  • Mutation testing
  • Contract testing
  • Chaos engineering

Test Pyramid

         ╱╲
        ╱  ╲         E2E Tests
       ╱────╲        (Few, Slow, Expensive)
      ╱      ╲
     ╱────────╲      Integration Tests
    ╱          ╲     (Medium)
   ╱────────────╲
  ╱              ╲   Unit Tests
 ╱________________╲  (Many, Fast, Cheap)

Quick Reference

Test TypeSpeedScopeConfidenceCost
UnitFast (ms)Single unitLow-MediumLow
IntegrationMedium (s)Multiple unitsMedium-HighMedium
E2ESlow (min)Full systemHighHigh

When to Use Each Type

Unit Tests

  • Business logic validation
  • Algorithm correctness
  • Edge case handling
  • Pure functions

Integration Tests

  • Database operations
  • API endpoints
  • Service interactions
  • Message queues

E2E Tests

  • Critical user journeys
  • Payment flows
  • Authentication
  • Cross-service workflows

Directory Structure

skills/testing/
├── _index.md
├── fundamentals/
│   ├── testing-pyramid.md
│   ├── test-driven-development.md
│   ├── behavior-driven-development.md
│   └── testing-principles.md
├── unit-testing/
│   ├── unit-test-basics.md
│   ├── mocking-strategies.md
│   ├── test-doubles.md
│   └── assertion-patterns.md
├── integration-testing/
│   ├── integration-test-basics.md
│   ├── database-testing.md
│   ├── api-testing.md
│   └── external-service-testing.md
├── e2e-testing/
│   ├── e2e-basics.md
│   ├── browser-testing.md
│   ├── mobile-testing.md
│   └── visual-regression.md
├── patterns/
│   ├── arrange-act-assert.md
│   ├── given-when-then.md
│   ├── test-fixtures.md
│   ├── factory-patterns.md
│   └── page-object-model.md
├── advanced/
│   ├── property-based-testing.md
│   ├── mutation-testing.md
│   ├── contract-testing.md
│   └── chaos-testing.md
└── ci-cd/
    ├── test-automation.md
    ├── coverage-reporting.md
    └── flaky-tests.md

Related Skills

Source

git clone https://github.com/Fujigo-Software/f5-framework-claude/blob/main/plugins/f5-core/skills/testing/SKILL.mdView on GitHub

Overview

Testing Skills provide comprehensive knowledge for building reliable, maintainable software with confidence in deployments. It covers fundamentals, unit, integration, end-to-end testing, patterns, and advanced techniques to ensure quality across the software lifecycle.

How This Skill Works

The skill groups concepts into Fundamentals, Unit, Integration, E2E, Patterns, and Advanced Testing, then guides you on selecting the right test type using the Test Pyramid. It emphasizes practical patterns like Arrange-Act-Assert and Given-When-Then, and shows how to structure tests with fixtures, mocks, and page objects to improve maintainability and coverage.

When to Use It

  • Validating business logic and pure functions with unit tests
  • Testing database operations, API endpoints, and external services via integration tests
  • Verifying critical user journeys, payments, and authentication with end-to-end tests
  • Applying test patterns (AAA, Given-When-Then) and using fixtures and page objects to improve maintainability
  • Exploring advanced testing practices like property-based, mutation, and contract testing

Quick Start

  1. Step 1: Map features to test types (Unit/Integration/E2E) and choose patterns (AAA, GWT, fixtures)
  2. Step 2: Implement tests with appropriate mocks, stubs, and fixtures; organize with page objects where applicable
  3. Step 3: Run tests locally and in CI, review results, and iterate on test quality and coverage

Best Practices

  • Follow the Testing Pyramid: many unit tests, fewer integration tests, and even fewer E2E tests
  • Ensure unit tests are isolated and independent to avoid flakiness
  • Use mocking, stubbing, and test doubles to isolate dependencies
  • Write clear, expressive assertions and leverage Given-When-Then or AAA patterns
  • Adopt structured test fixtures, factories, and page-object models to improve readability and reuse

Example Use Cases

  • Unit test a pure function with edge-case inputs to validate algorithm correctness
  • Unit test with mocks to isolate business logic from an external API
  • Integration test that verifies database CRUD operations and API interactions
  • E2E test automating a critical user journey (e.g., checkout) across a browser
  • Mutation testing applied to a core service to assess test effectiveness

Frequently Asked Questions

Add this skill to your agents

Related Skills

Sponsor this space

Reach thousands of developers