Unit Test Generator
Creates comprehensive unit tests with edge case coverage
Write unit tests for the following code.
Language: {language}
Test framework: {framework} (Jest / Pytest / JUnit / Go testing / xUnit)
Code to test:
```{language}
{code}
```
Requirements:
1. Tests for all public methods/functions
2. Positive scenarios (happy path)
3. Negative scenarios (invalid data, null, empty values)
4. Edge cases (boundary values, large numbers, empty arrays)
5. Mocks for external dependencies
6. Descriptive test names (should_return_X_when_Y)
7. AAA pattern (Arrange-Act-Assert)
8. Coverage: aim for 90%+
For each test add a comment: what exactly is being verified.
0 copies
Variables
Replace these variables with your own values before using:
{язык}{фреймворк}{код}
Prompt info
💻
Category
Programming
AI model
Any model
Application
Написание тестов для повышения надёжности кода
тестыunit-тестыTDDкачество кода
Similar prompts
SQL Query Builder
Builds SQL queries from natural language descriptions
Output: Complete, optimized SQL query with explanation. Context: {{DATABASE_TYPE...
💻 ProgrammingAny model
0 copies
Debug and Fix Error
Debugs errors and provides fixes with root cause analysis
Help me find and fix a bug in my code. Language: {language} Framework: {framewo...
💻 ProgrammingAny model
0 copies
Regex Pattern Creator
Creates regular expressions with detailed part-by-part explanations
Output: Complete regex pattern with test cases. Context: {{LANGUAGE}} regex, use...
💻 ProgrammingAny model
0 copies