360 Secure SkillHub
360 安全技能中心

tdd

提供测试驱动开发流程:Red→Green→Refactor 循环、缺陷修复 TDD 与反模式,测试执行工作流(环境检测→影响范围→执行→结果报告),以及边界值、等价类划分、判定表、错误推测、路径覆盖等测试设计技术。触发后要求首个动作即创建任务并编写失败测试。

drumrobot
drumrobot
热度 91.39
最近更新 2026-09-20 19:25:07
分类:开发依赖:代码执行 / 联网浏览搜索应用场景:代码生成 / 调试排错 / 工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add drumrobot/tdd
Metadata
name
tdd
metadata
{"author":"es6kr","version":"0.1.0"}
description
Test-Driven Development for coding and bug fixing. cycle - Red→Green→Refactor cycle, defining expected behavior, bug-fix TDD, anti-patterns, run - test execution workflow (environment detection→impact scope→execution→result reporting), test-strategies - boundary value·equivalence partitioning·decision table·error guessing·path coverage test design techniques. "TDD", "test first", "failing test", "doesn't work", "not working", "test design", "boundary value test", "test strategies", "equivalence partitioning", "bug fix", "run tests", "execute tests", "test run", "verify" triggers

TDD (Test-Driven Development)

Test-Driven Development: define expected behavior first, then make it pass with implementation.

Topics

Topic Description Guide
cycle Red→Green→Refactor cycle, bug-fix TDD, anti-patterns cycle.md
run Test execution workflow (environment detection→impact scope→execution→result reporting) run.md
test-strategies Boundary value·equivalence partitioning·decision table·error guessing·path coverage test-strategies.md

Quick Reference

Trigger entry (HARD STOP — first action)

When this skill is invoked, the FIRST tool call must be TaskCreate (Red/Green/Refactor/Verify) + Red test authoring. Diagnosis, planning, option asks, and medium decisions are forbidden before Red is authored + executed + failure confirmed. See cycle.md "Trigger entry".

TDD Cycle

Define expected behavior → natural failure → implement → pass → refactor. See cycle.md.

Test Execution

Environment detection → impact scope → execution (unit→integration→e2e) → result reporting. See run.md.

Test Design Techniques

Decide which test cases to write (boundary value, equivalence partitioning, etc.). See test-strategies.md.