tdd

Implement a failing-test-first workflow for bug fixes using pytest.

Updated May 31, 2020
One-click install
npx skills add https://github.com/xshi19/normix --skill tdd-xshi19
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/xshi19/normix/tree/main/.cursor/skills/tdd
Command: npx skills add https://github.com/xshi19/normix --skill tdd-xshi19

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill aids in the process of bug fixing by promoting a failing-test-first approach, which enhances code quality and reliability.

Core Features & Use Cases

  • Failing-Test-First Approach: Ensures that every bug fix is accompanied by a failing test, promoting thorough testing.
  • Workflow Guide: Provides a step-by-step guide to follow when fixing a bug, from understanding the issue to rerunning tests.
  • Use Case: When you encounter a bug in your code, use this Skill to guide you through writing a failing test first, then implementing the fix.

Quick Start

Write a failing test for the bug before making any changes to the code.

Frequently Asked Questions about tdd

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

FAQPage Schema
How do I fix bugs using test-driven development?

The failing-test-first approach requires writing a test that reproduces the specific bug before changing any code. This ensures the issue is accurately captured and provides a verifiable way to confirm the fix works without introducing regressions.

What is the workflow for failing-test-first bug fixing?

The failing-test-first workflow guides you step-by-step from understanding the issue to writing a failing test, implementing the code fix, and rerunning tests. This structured process promotes thorough testing and enhances overall software reliability.

Does test-driven development for bug fixing work with Python and pytest?

Yes, implementing a failing-test-first development process for bug fixing requires Python and a testing framework like pytest. This setup is applicable for fixing bugs in scenarios such as web applications or software libraries.

Why should I write a failing test before fixing a bug?

Writing a failing test before fixing a bug ensures every code change is validated against the specific issue. This test-driven development practice enhances code quality by preventing future regressions and verifying the exact reliability of the fix.

When should I use a failing-test-first approach for software testing?

Use the failing-test-first approach during software testing and debugging when you encounter a bug in code. It is highly applicable in critical scenarios like fixing bugs in web applications or software libraries to ensure thorough testing and code reliability.