跳转到主要内容
此内容尚未提供您的语言版本,正在以英文显示。

Test Driven Development

技能 活跃
属于:Tdd

Use when implementing any feature or bugfix, before writing implementation code - write the test first, watch it fail, write minimal code to pass; ensures tests actually verify behavior by requiring failure first

目的

To enforce Test-Driven Development by ensuring tests are written first, verified to fail, and then minimal code is written to pass them, guaranteeing behavioral verification.

功能

  • Enforces Test-Driven Development methodology
  • Requires tests to fail before implementation code is written
  • Provides step-by-step guidance for the Red-Green-Refactor cycle
  • Details common TDD anti-patterns and rationalizations
  • Ensures tests verify behavior, not just implementation

使用场景

  • Implementing new features using TDD
  • Fixing bugs with a test-first approach
  • Refactoring code while maintaining test coverage
  • Ensuring code quality through rigorous testing practices

非目标

  • Writing tests after implementation code
  • Skipping TDD for perceived simple code or prototypes
  • Accepting tests that pass immediately without prior failure
  • Treating testing as an optional afterthought

工作流

  1. Write a failing test for the desired behavior (RED).
  2. Verify that the test fails correctly.
  3. Write the minimal amount of code to make the test pass (GREEN).
  4. Verify that the test passes and all other tests still pass.
  5. Refactor the code while keeping tests green.
  6. Repeat the cycle for the next piece of behavior.

实践

  • Test-Driven Development

Maintenance

  • warning:Commit recencyThe last commit was over 90 days ago, indicating potential lack of recent maintenance.

Trust

  • warning:Issues AttentionThere are 6 open issues and 8 closed issues in the last 90 days, indicating a low closure rate and potentially slow maintainer response.

Versioning

  • warning:Release ManagementThere is no explicit versioning system (like semver in frontmatter or CHANGELOG) and installation instructions reference `main`, making it difficult to pin a specific version.

安装

请先添加 Marketplace

/plugin marketplace add NeoLabHQ/context-engineering-kit
/plugin install tdd@context-engineering-kit

质量评分

75 /100
1 day ago 分析

信任信号

最近提交9 days ago
星标993
许可证GPL-3.0
状态
查看源代码