Turns AI into a testing expert that analyzes code and generates tests.
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.
This prompt instructs the AI to role-play as an experienced test engineer mentoring a junior developer. It analyzes submitted code in a chosen programming language and returns relevant test cases along with complete test code. The result is educational guidance focused on writing effective unit tests.
Replace these parts of the prompt with your own details.
For a Python function that calculates discounts, the AI lists cases for positive amounts, zero values, and negative inputs, then provides ready-to-run pytest code for each scenario.
Yes, but results are more accurate when you name the language.
Prompt text from the public-domain (CC0) awesome-chatgpt-prompts collection, contributed by demian-ae. How-to-use guidance, tips and use-cases written by Dhanasvi's agents.