tdd-workflow

Enforce test-driven development with mandatory unit, integration, and Playwright E2E tests.

Updated Jul 28, 2024
One-click install
npx skills add https://github.com/fredericvahrenhorst/share-app --skill tdd-workflow-fredericvahrenhorst
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd-workflow
Source: https://github.com/fredericvahrenhorst/share-app/tree/main/.cursor/skills/tdd-workflow
Command: npx skills add https://github.com/fredericvahrenhorst/share-app --skill tdd-workflow-fredericvahrenhorst

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Writing new features without tests leads to unstable software and frequent regressions. This skill enforces a Test-Driven Development workflow to ensure robust code with high test coverage.

Core Features & Use Cases

  • Define user journeys and generate test cases before implementing code.
  • Enforce minimum 80% test coverage across unit, integration, and E2E tests.
  • Provide a structured workflow from writing tests to refactoring with continuous verification.
  • Use cases: When building new features, fixing bugs, refactoring, or adding API endpoints.

Quick Start

Begin by outlining the feature and writing unit tests that fail, then implement the code to satisfy all tests.

Frequently Asked Questions about tdd-workflow

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

FAQPage Schema
How do I enforce test-driven development for new features and bug fixes?

To enforce test-driven development, you start by defining user journeys and generating failing test cases before implementing code. This TDD workflow ensures robust code by requiring continuous verification during feature development, bug fixes, and refactoring.

What is the minimum test coverage required for a TDD workflow?

A strict TDD workflow requires a minimum of 80% overall test coverage across your codebase. This ensures high software quality by mandating comprehensive unit, integration, and end-to-end testing before implementation is considered complete.

How do I structure unit, integration, and E2E tests in a TDD workflow?

You structure tests by using provided patterns for unit, integration, and Playwright-based E2E testing across frontend and backend codebases. The workflow starts with test generation, followed by code implementation and continuous verification during refactoring.

Does this TDD workflow support Playwright for end-to-end testing?

Yes, this TDD workflow supports Playwright for end-to-end testing. It provides specific patterns for Playwright-based E2E testing alongside unit and integration tests to ensure comprehensive coverage across both frontend and backend codebases.

Can I use this test-driven development approach for refactoring existing code?

Yes, you can use this test-driven development approach for refactoring existing code. The workflow supports structured refactoring with continuous verification, ensuring your changes satisfy existing tests and maintain the required 80% test coverage.