Write Tests First.prompt
--- name: write-tests-first description: 테스트 우선 작성 agent: agent id: write-tests-first.v1 purpose: 테스트를 먼저 작성하고 구현을 보완하기 위한 프롬프트 portability: generic difficulty: intermediate inputs: - target_behavior output_contract: - 계획 - 변경 - 검증 - 리스크 --- 아래 대상에 대한 테스트를 먼저 작성해 줘. 대상: {{target}} 기술 스택: - JUnit 5 (`@ExtendWith(MockitoExtension.class)`) - Mockito (`given/willReturn` 방식 선호) - AssertJ (`assertThat`, `assertThatThrownBy`) - 외부 의존성은 mock 처리 케이스 구성: - **Success case** — 정상 입력, 기대 결과 확인 - **Failure case** — 에러 조건, 예외 타입 및 메시지 확인 - 경계값 (필요한 경우) 네이밍: - 메서드명: `methodName_scenario_expectedBehavior` (영어) - `@DisplayName`: 한국어 (`"성공 시 결과를 반환한다"`) 출력 형식: 1. 테스트 코드 (Success + Failure 케이스) 2. 테스트 통과를 위한 최소 구현 스텁 3. 이 테스트가 검증하는 핵심 동작
fill the variables
This prompt has 1 variable. Pro fills them into a ready-to-paste prompt for you — no manual find-and-replace.
{{target}
Unlock with Pro →when to use it
Community prompt sourced from the open-source GitHub repo kyungseo/ai-workflow-harness (Apache-2.0). A "Write Tests First.prompt" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.
tags
productivitycommunitydeveloper
source
kyungseo/ai-workflow-harness · Apache-2.0
more in Productivity
Productivity✓ tested
Summarize a doc into decisions & actions
chief of staff who extracts what to DO, not just what was said
Productivity✓ tested
Draft a reply to a hard email
calm, direct communicator who de-escalates without caving
Productivity✓ tested
Turn a brain-dump into a weekly plan
planning coach who protects your focus, not just your calendar