일부 편집 내용은 현재 영어로 제공됩니다.

프롬프트 편집 전용 업데이트

단위 테스트 생성 프롬프트

함수나 모듈에서 정상 경로, 경계, 예외를 다루는 집중적인 단위 테스트를 생성하고, 가정에 의존하는 단언을 표시합니다.

단위 테스트테스트 생성프롬프트 엔지니어링
재사용 가능한 프롬프트

내용으로 변경

프롬프트 언어: 영어
브라우저에서 실행

워크플로

5 단계
  1. Paste the code and pick a framework.
  2. Generate the tests.
  3. Review each test's intent and assumptions.
  4. Run the suite and fix failures.
  5. Add only the tests that add real coverage.

네거티브 프롬프트

testing private internals, brittle snapshots, flaky timing assertions, empty test cases

기록할 매개변수

framework
infer from the project
coverage
happy path + boundaries + errors
output
tests + run instructions
변수
3 개의 맞춤 항목

제한 사항

  • Generated tests can assert the wrong expected value.
  • They may miss framework-specific setup.
  • They are a starting point, not a proof of correctness.

관련 템플릿

전체 보기 →