Skip to main content
idapt
HomeAI ModelsPricing
Sign inStart free
All prompts

Prompt library

Derive test cases from a spec

Deriving the matrix before writing code keeps coverage systematic instead of vibes-driven, and the [SPEC?] discipline routes ambiguity back to the spec author instead of baking the model's guess into your test suite as truth. Hostile-QA cases surface the gaps specs systematically miss.

EngineeringCodeSuggested model: moonshotai/kimi-k2.7-code

Last reviewed July 17, 2026

The prompt
Derive test cases from the spec below.

Spec: {{spec}}
Test framework and level: {{framework}}

Produce:
1. A test matrix table first: behavior, input class, expected outcome, priority. Cover the happy path, each boundary named or implied by the spec, invalid inputs, state-dependent cases, and concurrency or ordering if the spec touches them.
2. Ambiguity list: every place the spec does not define an outcome. Write the test name you would want, then STOP and mark it [SPEC?]; do not pick an expected value yourself.
3. Code for the priority-1 tests in the given framework, one assertion of behavior per test, names that read as sentences.
4. The 3 nastiest cases a hostile QA would try that the spec author probably did not think about.

Do not test implementation details; test the contract.
Run in idaptOpens a new chat with the prompt prefilled. Nothing sends until you press send.

Fill in the variables

VariableWhat it isExample
{{spec}}The spec, user story, or acceptance criteria[paste the spec section]
{{framework}}Framework and test levelvitest, unit level

Frequently asked

Related prompts

Review a diff like a senior engineerBuild a regex with tests, not vibesTurn a vague bug into a reproducible report

Ready to get to work?

Free to start. No credit card. Never trained on your data.

Start free
  • Home
  • Pricing
  • AI Models
  • Image models
  • Voice models
  • Video models
  • Rankings
  • New models
  • Model status
  • Multi-Model Chat
  • Voice Mode
  • Voice HUD
  • Web Search
  • Image Generation
  • Video Generation
  • Audio Generation
  • Transcription
  • Drive
  • Secrets
  • Sharing
  • Workspaces
  • Tasks
  • Memory
  • Agents
  • Subagents
  • Automations
  • Skills
  • Code Execution
  • Computers
  • Computer Use
  • Cloud Computers
  • Local AI
  • AI Gateway
  • API & SDK
  • CLI
  • MCP
  • Tunnels
  • All features →
  • Blog
  • Use cases
  • Comparisons
  • Best of
  • Learn
  • Free tools
  • Prompts
  • Templates
  • Changelog
  • Help center
  • FAQ
  • Privacy
  • Compare all models
  • Support
  • Developers
  • Quickstarts
  • API reference
  • API pricing
  • CLI
  • MCP
  • Downloads
  • Desktop
  • Badges and embeds
© idapt[email protected]TermsPrivacy PolicyLegal noticeReport content
X (Twitter)