mcpField
T
testing-strategy

testing-strategy

github.com/blockTesting & quality25151 installsUpdated 18w ago
Repository

About testing-strategy

A concise set of software testing guidelines for developers, covering unit and integration tests, test structure, execution, and quality practices.

Key features

  1. 01Isolated unit test guidance
  2. 02Integration test recommendations
  3. 03Example test commands
  4. 04Organized test directory structure
  5. 05Arrange-Act-Assert practice
  6. 06Coverage priorities

Use cases

  1. 01Plan unit tests for individual behaviors
  2. 02Test API endpoints and database changes
  3. 03Organize shared fixtures and test helpers
  4. 04Prioritize coverage for critical paths

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/block/agent-skills --skill testing-strategy

After installing, type/testing-strategyin Claude Code to confirm it loaded.

Details

From the project README

Testing Guidelines

Unit Tests

  • Test one thing per test
  • Use descriptive test names: test_user_creation_fails_with_invalid_email
  • Mock external dependencies
  • Keep tests fast and isolated

Integration Tests

  • Test API endpoints with realistic data
  • Verify database state changes
  • Clean up test data after each test
  • Use test fixtures for common scenarios

Running Tests

# Run all tests
npm test

# Run unit tests only
npm test:unit

# Run integration tests (requires database)
npm test:integration

# Run tests with coverage
npm test:coverage

Test Structure

tests/
├── unit/           # Fast, isolated unit tests
├── integration/    # Tests requiring external services
├── fixtures/       # Shared test data
└── helpers/        # Test utilities

Best Practices

  1. Arrange-Act-Assert: Structure tests clearly
  2. One assertion per test: When possible, test one behavior
  3. Descriptive names: Test names should describe the scenario
  4. No test interdependence: Tests should run in any order
  5. Clean state: Each test starts with a known state

Coverage Goals

  • Aim for 80%+ line coverage
  • Focus on critical paths first
  • Don't sacrifice test quality for coverage numbers

Comments

Markdown supported