tests

Enforce layered unit, integration, and end-to-end test coverage for Python projects.

33|5|Updated Feb 12, 2024
One-click install
npx skills add https://github.com/ocbunknown/fastapi-claude-template --skill tests-ocbunknown
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: tests
Source: https://github.com/ocbunknown/fastapi-claude-template/tree/main/.claude/skills/tests
Command: npx skills add https://github.com/ocbunknown/fastapi-claude-template --skill tests-ocbunknown

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This guideline helps teams enforce comprehensive testing across unit, integration, and end-to-end levels for Python projects, ensuring test coverage, mutation-persistence checks, and proper use of fixtures and infra details.

Core Features & Use Cases

  • Enforces per-use-case unit coverage, per-endpoint e2e coverage, and loads opt-in tests.
  • Defines mandatory scenarios for each test type (unit, integration, e2e) and includes guidance on fixtures, test structure, and mutation persistence checks.
  • Provides a layered testing approach and best practices to catch regression and ensure test infra reliability across the codebase.

Quick Start

Create unit tests under tests/unit/ following the mandatory scenarios and reuse the provided fixtures to ensure coverage across unit, integration, and e2e layers.

Frequently Asked Questions about tests

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

FAQPage Schema
How do I structure Python tests to catch regressions across unit, integration, and e2e layers?▼

Layered Python tests catch regressions by enforcing per-use-case unit coverage, per-endpoint e2e validation, and mutation-persistence checks across tests/unit/, tests/integration/, and tests/e2e/ directories using mandatory scenarios.

What is the best way to organize pytest fixtures for reuse across unit and integration tests?▼

Organize pytest fixtures for reuse by following prescribed mandatory patterns that define fixture usage and test structure, ensuring test infrastructure reliability and comprehensive coverage across the codebase.

How do I enforce mandatory test scenarios for per-use-case unit and per-endpoint e2e coverage?▼

Enforce mandatory test scenarios by applying prescribed patterns for per-use-case unit tests and per-endpoint e2e validation, including contract validation and mutation-persistence checks to guarantee comprehensive coverage.

Do I need mutation-persistence checks for Python testing, and what do they validate?▼

Mutation-persistence checks are needed for Python testing to validate that tests effectively catch regressions, ensuring test infra reliability and maintaining rigorous layered test coverage across the codebase.

Can I use this testing guideline for Python apps with opt-in test loads?▼

Yes, this testing guideline applies to Python apps with opt-in test loads, as it specifically includes loads opt-in tests and defines mandatory scenarios for each test type to ensure comprehensive coverage.