본문으로 건너뛰기
cccskills
무료GitHub에 공개

test-desiderata

Apply Kent Beck's Test Desiderata to plan, add, rewrite, or review tests. Use when Codex is designing a test strategy, adding or changing unit/integration/e2e tests, reproducing a bug with a failing test, reviewing test quality, deciding what level of test to write, or explaining test tradeoffs.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Lex-Inc/roughdraft스타 458(GitHub 458 + cccskills 0)

실행 점수 미검증

설치 방법 보기

포함된 파일(2)

  • SKILL.md3.6 KB
  • agents/openai.yaml225 B

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Test Desiderata

Use the desiderata as design lenses, not a rigid checklist. The goal is to optimize the value of the tests by making explicit tradeoffs among valuable properties. Source: https://testdesiderata.com/

Workflow

  1. State the behavior or risk the test must protect in one sentence before choosing the test level.
  2. Choose the fastest test level that remains predictive of production behavior. Escalate from pure unit tests to integration or e2e tests only when the boundary itself is the behavior under test.
  3. Prefer tests that fail for user-visible behavior changes over tests that fail because a private implementation detail was refactored.
  4. Make the failure diagnostic: the test name, fixture, and assertion should point to the broken behavior without requiring a long investigation.
  5. Keep setup local to the test or an explicit helper that preserves isolation and determinism.
  6. Run the narrow relevant command first, then the broader package or repo command when the change is broad enough to justify it.
  7. In the final response, name the command run and any meaningful test tradeoff made.

Desiderata

  • Isolated: test results should not depend on execution order or shared mutable state.
  • Composable: independently valuable tests should combine without hidden coupling or cascading setup requirements.
  • Deterministic: unchanged code and inputs should produce the same result every run.
  • Fast: tests should be quick enough that agents and humans will run them while working.
  • Writable: tests should be cheap to create relative to the behavior protected.
  • Readable: tests should make their motivation and expected behavior clear to the next maintainer.
  • Behavioral: tests should change result when the behavior under test changes.
  • Structure-insensitive: tests should survive internal refactors that preserve behavior.
  • Automated: tests should run without manual intervention.
  • Specific: failures should make the likely cause obvious.
  • Predictive: passing tests should give justified confidence that production behavior is acceptable.
  • Inspiring: the suite should increase confidence, not create noise, flakes, or avoidance.

Repo Defaults

  • For bug fixes, create the smallest failing behavioral test before implementation, following the repo's AGENTS.md bug-fix workflow.
  • Use slog before or during test work when runtime behavior is uncertain and static reading is not enough.
  • For Markdown and CriticMarkup behavior, prefer fixture or round-trip coverage that protects the file-format contract.
  • For UI behavior, prefer component tests for local interaction logic and Playwright only when browser, file, server, or cross-view behavior is the product risk.
  • Avoid snapshot-heavy or DOM-structure-heavy assertions unless the rendered structure itself is the public contract.

Tradeoff Notes

When a test intentionally sacrifices one desideratum for another, make that explicit in a short comment or final summary. Common acceptable tradeoffs:

  • Slower e2e coverage for a critical file-system or browser integration path.
  • A slightly larger fixture when readability and production similarity matter more than minimal setup.
  • Multiple focused tests instead of one broad test when specificity and determinism matter more than brevity.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

slog

무료

Structured logging workflow for debugging code paths with per-run log files in `.context/slog`. Use when the user says "use slog", asks for structured logging, wants you to instrument a flow, run it, and inspect logs. Triggers on requests like "use slog", "add structured logs", "log this flow", or "debug with slog".

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Lex-Inc/roughdraft4582026년 6월 20일 업데이트

Lex-Inc의 스킬 모두 보기

이 스킬의 문제 신고