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 Expertdevelopercoding
- Structured Python Production Code Generatordevelopercoding
- Angular Standalone Directive Generatordevelopercoding
- Pytest Unit Test Suite Generatordevelopercoding
- Unity Architecture Specialistdevelopercoding
- Web Typography CSS Generatordevelopercoding
- VSCode CodeTour File Expertdevelopercoding
- Senior Python Code Reviewerdevelopercoding
- Structured Cross-Language Code Translatordevelopercoding
- Multi-DB SQL Query Optimizer and Builderdevelopercoding