1 / 2 · Book 2 · The Anatomy of a Test-Generation Prompt · drill: interview Q&A⊞ allnext →Get the book →
1.10Self-Assessment Quiz
Test your understanding of Chapter 1:
- What are the five elements of an effective test-generation prompt?
- Why is pasting an OpenAPI schema more effective than describing it?
- What is the typical negative-to-positive test ratio in a well-designed suite?
- Why should you provide a style reference in your prompt?
- How many iterations does the prompt refinement loop typically require?
- What happens when you ask for 100 tests in a single prompt?
- Name three things that strong context tells the LLM that weak context does not.
Answers:
- Context, Artifact, Constraints, Coverage Goals, Output Format
- The schema provides exact field names, types, constraints, and response codes -- eliminating ambiguity and hallucination
- Approximately 2:1 negative to positive
- The AI replicates naming conventions, fixture usage, assertion style, and code structure from examples
- 2-3 iterations
- Quality degrades in later tests; generate in batches of 10-20 instead
- Technology stack details, external dependencies, data formats, authentication mechanism, business flow, architecture style