Prepare test cases for a simple function
Design tests of the expected behaviour before changing the code.
Prepare and copyYour prompt
Prepare your prompt
1. Fill in your details. 2. Copy the prepared prompt. 3. Paste it into your AI.
Field 1 of 4
Use fictional or anonymised information. Do not include passwords or customer data. The example shows the format. Use your own details; it is not added to your answer.
Complete the fields or use “I don’t know yet”.
0 of 4 fields ready
Complete the fields or use “I don’t know yet”.
Review prepared prompt
Help me prepare test cases for this function: [CODE WITHOUT SECRETS]. Expected behaviour: [REQUIREMENTS]. Language and environment: [DATA]. Available testing tool: [TOOL]. If the behaviour is undefined, ask before deciding what it should be. Provide a table of normal cases, empty input, boundaries and invalid input, stating the input, expected output and reason. Select five useful tests that check requirements without copying the implementation. If I specify a tool, write a minimal compatible example; otherwise provide pseudocode. Explain how to interpret a failure. Do not claim to have run the tests, and avoid using real services, credentials or private data in the examples.
View original prompt
Help me prepare test cases for this function: [CODE WITHOUT SECRETS]. Expected behaviour: [REQUIREMENTS]. Language and environment: [DATA]. Available testing tool: [TOOL]. If the behaviour is undefined, ask before deciding what it should be. Provide a table of normal cases, empty input, boundaries and invalid input, stating the input, expected output and reason. Select five useful tests that check requirements without copying the implementation. If I specify a tool, write a minimal compatible example; otherwise provide pseudocode. Explain how to interpret a failure. Do not claim to have run the tests, and avoid using real services, credentials or private data in the examples.
Your answers are used only here: they are not saved to your account or sent to an AI. Preparing a prompt does not use Raven AI queries.
What it helps you do
Design tests of the expected behaviour before changing the code.
Where to use it
An AI tool that can work with code. Review and test its suggestions in your project.
Recommended AI tools
For writing, plans or instructions
Available features depend on each tool’s plan and account.
What information to provide
- Code or requirements
- Language and versions
- Error, target and evidence available
The full prompt specifies the information and fields you need to fill in.
What to expect
- Explanation of the problem or proposal
- Code or steps adapted to the data provided
- Evidence and limitations to review
See an example of guidance
Case: a function receives empty data. Proposal: validate the input, explain the expected behavior and check both the empty case and the correct case.
Ejemplo ilustrativo de formato; no es un resultado generado con este prompt. The answer depends on your data and the tool used.
How to use it
- Fill in your details in “Prepare your prompt” once you have access.
- Copy the prepared prompt or use the original if you prefer to edit it yourself.
- Paste it into a compatible tool and review the answer.
Free prompt
Report a problem
RAVENPROMPTS
Find more prompts for better results.
Explore our library of prompts to create, sell, learn and work better with artificial intelligence.
Explore bank of prompts →