Skip to content
GitHub

test-driven-development - Test-Driven Development

test-driven-development

Test-Driven Development

Popular Featured Community Development
GitHub

Description

Development methodology of writing tests before implementing code, producing more reliable and maintainable software

Use Cases

  • Test planning before new feature development
  • Ensuring behavior doesn’t change during refactoring
  • Writing reproduction tests before bug fixes
  • Improving code coverage and quality
  • Standardizing team code review

Core Capabilities

  • Test First: Define expected behavior before implementation
  • Red-Green-Refactor: Follow the TDD cycle
  • Edge Coverage: Identify and test boundary cases
  • Testable Design: Write code structures that are easy to test

Example

I need to implement a user registration feature with requirements:
- Username 3-20 characters
- Valid email format
- Password at least 8 characters with numbers and letters
Please help me write test cases first, then implement the feature.

Notes

  • Tests should be independent and repeatable
  • Avoid testing implementation details, test behavior
  • Keep tests simple and readable

Applicable Roles

Developer DevOps/IT

Tags

testingtddqualitymethodology