Skip to content
AI Tools

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качество кода