Mandatory TDD/BDD Testing Strategy

Enforce TDD/BDD with 80% test coverage for Python and TypeScript.

2|1|Updated May 27, 2025
One-click install
npx skills add https://github.com/PAIPalooza/chicommerce --skill mandatory-tdd-bdd-testing-strategy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Mandatory TDD/BDD Testing Strategy
Source: https://github.com/PAIPalooza/chicommerce/tree/main/.ainative/skills/mandatory-tdd/compressed
Command: npx skills add https://github.com/PAIPalooza/chicommerce --skill mandatory-tdd-bdd-testing-strategy

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill enforces a strict Test-Driven Development (TDD) and Behavior-Driven Development (BDD) strategy, ensuring code quality and reliability by requiring tests to be written before implementation and mandating specific testing and coverage thresholds.

Core Features & Use Cases

  • Test-First Enforcement: Mandates writing failing tests prior to code implementation.
  • Deterministic Selectors: Promotes the use of data-testid, role, and label for stable UI testing.
  • Coverage Mandate: Requires a minimum of 80% test coverage for all code.
  • Use Case: A development team needs to ensure all new features are thoroughly tested and meet a high standard of code coverage before merging into the main branch.

Quick Start

Execute the backend Python tests using the command python3 -m pytest tests/ -v --cov=app --cov-report=term-missing.

Frequently Asked Questions about Mandatory TDD/BDD Testing Strategy

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

FAQPage Schema
How do I enforce test-driven development and behavior-driven development in a Python and TypeScript project?

To enforce TDD and BDD, you mandate writing failing tests before implementation, use deterministic selectors for frontend tests, and require a minimum of 80% code coverage for both backend and frontend codebases.

What is the minimum code coverage required when applying a mandatory TDD testing strategy?

A mandatory TDD testing strategy requires a minimum of 80% test coverage for all codebases. You must generate evidence of test execution and coverage reports to verify this threshold is met before merging.

How do I execute backend Python tests and generate a coverage report?

To execute backend Python tests and generate a coverage report, run the command `python3 -m pytest tests/ -v --cov=app --cov-report=term-missing` to evaluate your test suite against the application code.

What are deterministic selectors and why are they needed for frontend UI testing?

Deterministic selectors, such as `data-testid`, `role`, and `label`, provide stable element targeting for frontend UI testing. They prevent tests from breaking due to styling changes and ensure reliable behavior-driven development validation.

Does this TDD and BDD testing strategy work for both Python and TypeScript codebases?

Yes, this TDD and BDD testing strategy applies to both Python backend and TypeScript frontend codebases. It enforces test-first development and mandates an 80% coverage threshold across the entire software project.

When should I use behavior-driven development over standard test-driven development?

You should use behavior-driven development alongside test-driven development when you need to validate user-facing frontend interactions using deterministic selectors, ensuring both backend logic and UI behavior meet strict coverage thresholds.