본문으로 건너뛰기
Skillpedia
테스트81k · #1701

tdd-workflow

하는 일

이 스킬은 런던 학파 방식의 테스트 주도 개발 주기를 안내하며, 의존성을 먼저 목으로 만듭니다. 테스트가 앞서 이끄는 방식으로 기능을 단계별로 만들려는 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓바깥에서 안으로 테스트를 먼저 작성하며 기능을 만들고 싶을 때.
  • ✓새 동작에 대해 빨강, 초록, 리팩터링의 명확한 순서를 원할 때.
  • ✓작업을 완료로 보기 전에 최종 테스트 결과를 확인하고 싶을 때.

스킬 링크

https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-testgen/skills/tdd-workflow/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-testgen/skills/tdd-workflow/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“할인 계산을 테스트 우선으로 만들어 주세요. 목으로 만든 가격 서비스에 대한 실패 테스트부터 시작해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

이 스킬은 목으로 된 의존성을 쓰는 실패 테스트를 작성하고, 올바른 이유로 실패하는지 실행해 확인합니다. 그다음 통과시키는 가장 단순한 코드를 쓰고 리팩터링합니다. 성공을 보고하기 전에 대상 테스트와 회귀 테스트를 실행해 실제 결과를 기록합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Follow the TDD London School (mock-first) approach:

  1. Write the failing test first -- define expected behavior with mocked dependencies
  2. Run the test -- confirm it fails for the right reason
  3. Implement minimal code -- make the test pass with the simplest solution
  4. Refactor -- clean up while keeping tests green
  5. Repeat -- add the next behavior

Before starting: mcp__plugin_ruflo-core_ruflo__hooks_pre-task({ description: "TDD: FEATURE_NAME" }) Before reporting the outcome, run the final target tests and the regression suite after the last edit. Record the actual commands, exit codes, whether tests ran, and failing test names. The initial red test is expected during TDD; only the final validation determines success.

Call mcp__plugin_ruflo-core_ruflo__hooks_post-task with the observed result, including when the task is abandoned or validation is interrupted. Set completed, targetTestsRan, and regressionTestsRan to true only when observed; use null for missing exit codes. Skipped or unrun validation is not success. Never substitute an expected result for an observed one.

The following example maps those observations to the hook input (tool-call notation):

const success = completed && targetTestsRan && regressionTestsRan
  && targetExitCode === 0 && regressionExitCode === 0;
mcp__plugin_ruflo-core_ruflo__hooks_post-task({
  taskId: "tdd-FEATURE",
  success,
  storeResults: true,
  task: JSON.stringify({
    feature: "FEATURE",
    targetCommand, targetExitCode, targetTestsRan,
    regressionCommand, regressionExitCode, regressionTestsRan,
    failingTestNames,
    failureReason: success ? null : failureReason
  })
});

On failure, report success: false and the failing test names in task. If the runner failed before identifying tests, or the task was abandoned, state that reason instead of inventing test names.

Principles:

  • Mock external dependencies at boundaries
  • Test behavior, not implementation
  • One assertion per test when possible
  • Descriptive names: should [behavior] when [condition]
자주 묻는 질문

처음 실패하는 테스트는 문제인가요?

아니요. 원본은 이 방법에서 처음의 빨간 테스트는 예상된 것이라고 말합니다. 최종 검증만이 성공을 결정합니다.

성공은 무엇으로 판단하나요?

대상 테스트와 회귀 테스트 모두가 실제로 실행되어 통과해야 합니다. 건너뛴 테스트는 성공이 아닙니다.

결과를 기록하나요?

네. 관찰된 결과와 함께 작업 결과를 메모리 훅에 보고합니다.

상세 정보

작성자의 원본 설명

TDD London School workflow -- mock-first, outside-in test development

repo: ruvnet/ruflo

인기도

GitHub 스타
81k
순위
#1701
라이선스
MIT
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬