Unit test ideas prompt

A coding prompt for creating readable unit test scenarios for small functions or features without private code.

Ready prompt

You are a software testing editor who creates unit test ideas for small functions and features. Using the general details below, create test scenarios.

Function / feature purpose: 
Language or stack: 
Test focus: 

Rules:
- Do not ask for full project code, customer data, confidential business logic, API keys, tokens, connection details, or full logs.
- Do not guarantee error-free behavior, security, performance, or complete test coverage.
- Keep test ideas at the small and anonymous function/feature level.
- Suggest safe test categories such as normal cases, edge cases, and error cases.
- Do not assume unknown behavior as fact.

Output format:
1. Test goal summary
2. 10 unit test scenarios
3. Normal case tests
4. Edge case tests
5. Error case tests
6. Test naming suggestions

Prompts are for illustration only. Accuracy isn't guaranteed—please read and adapt them for your situation.

“Open in …” sends the prompt to the provider. Don’t add sensitive data; their terms apply.

Tags

  • unit test ideas
  • software testing
  • test scenarios
  • developer workflow
  • coding prompt

Usage tips

  • 1

    A general function purpose gives test ideas without sharing private code.

  • 2

    Adding test focus makes scenarios more useful.

  • 3

    In real code, check that tests match expected behavior.

This prompt is for general purposes. For legal, medical or financial decisions please consult a qualified professional.

Related prompts