developer coding template risk: low
Test Cases and Code Generator Tutor
Acts as an expert software test engineer experienced in a specified programming language, teaching a junior developer how to write tests. Analyzes provided code and responds with t…
PROMPT
Act as an expert software engineer in test with strong experience in `programming language` who is teaching a junior developer how to write tests. I will pass you code and you have to analyze it and reply me the test cases and the tests code.
INPUTS
- programming language REQUIRED
-
The programming language of the provided code
e.g. Python
REQUIRED CONTEXT
- code snippet
ROLES & RULES
Role assignments
- Act as an expert software engineer in test with strong experience in `programming language` who is teaching a junior developer how to write tests.
- Analyze the code.
- Reply with the test cases and the test code.
EXPECTED OUTPUT
- Format
- markdown
- Constraints
-
- include test cases
- include test code
SUCCESS CRITERIA
- Analyze provided code.
- Provide test cases.
- Provide test code.
FAILURE MODES
- Placeholder `programming language` may not be specified.
- No explicit output format may lead to unstructured responses.
- Assumes code is provided in subsequent messages.
CAVEATS
- Dependencies
-
- User-provided code
- Specified programming language
- Missing context
-
- Testing framework or library for the `programming language`.
- Expected depth of explanation for junior developer.
- Output format or structure.
- Ambiguities
-
- "in test" is unclear, likely means "in testing".
- Does not specify type of tests (e.g., unit, integration).
- Unclear what "test cases" means: descriptions, scenarios, or code outlines? Distinction from "tests code" ambiguous.
QUALITY
- OVERALL
- 0.75
- CLARITY
- 0.85
- SPECIFICITY
- 0.65
- REUSABILITY
- 0.90
- COMPLETENESS
- 0.60
IMPROVEMENT SUGGESTIONS
- Fix grammar: "Act as an expert software engineer in testing... reply with the test cases and test code."
- Specify: "Focus on unit tests using the standard framework for `programming language` (e.g., JUnit for Java, pytest for Python)."
- Add structure: "1. Brief code analysis. 2. List of test cases with purpose. 3. Complete test code. 4. Explanation for junior dev."
- Use clear placeholder: "For the following code in `programming language`: ``` {code} ```"
USAGE
Copy the prompt above and paste it into your AI of choice — Claude, ChatGPT, Gemini, or anywhere else you're working. Replace any placeholder sections with your own context, then ask for the output.
MORE FOR DEVELOPER
- Context7 Library Documentation Expert developer coding
- Structured Python Production Code Generator developer coding
- Angular Standalone Directive Generator developer coding
- Pytest Unit Test Suite Generator developer coding
- Unity Architecture Specialist developer coding
- Web Typography CSS Generator developer coding
- VSCode CodeTour File Expert developer coding
- Senior Python Code Reviewer developer coding
- Structured Cross-Language Code Translator developer coding
- Multi-DB SQL Query Optimizer and Builder developer coding
- Base R Programming Reference Guide developer coding
- Flutter Map SDK Layer Bug Fixer developer coding
- Expert Mobile App Builder for iOS Android developer coding
- Scalable Backend Architect Expert developer coding
- Comprehensive TypeScript Codebase Reviewer developer coding
- Code Improvement and Refactoring Suggester developer coding
- Vercel SPA Blank Screen Diagnoser developer coding
- CLAUDE.md File Generator for AI Coders developer coding
- App Store Screenshots Gallery Generator developer coding
- Spring Boot SOLID Architect Specialist developer coding
- React SaaS Metrics Dashboard Generator developer coding
- Software Optimization Auditor developer coding
- Senior Frontend Task Checklist Architect developer coding
- POSIX Shell Script Developer with Checklists developer coding
- Astro v6 Strict Architecture Rules developer coding