generate-tests
SolidUse when the user asks to generate, create, or write unit tests for code. Analyzes the target code, produces a structured test case list for review, then generates test code. Supports Java (JUnit 5, Mockito, AssertJ).
Testing & QA 49 stars
7 forks Updated yesterday MIT
Install
Quality Score: 86/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
# Generate Tests Skill
You will analyze code and generate high-quality unit tests for a given target.
**Target to test:** $ARGUMENTS
## Quality Standards
- Take your time to analyze the code thoroughly before generating test cases.
- Quality is more important than speed — read all relevant source files and rules carefully.
- Do not skip any step in the workflow below. Every step exists for a reason.
- Do not take shortcuts with test data — read the actual classes to use correct constructors and fields.
---
## Instructions
### Step 1: Read Rules and Analyze Context
1. **Read the relevant rules** from `./rules/tests/` based on code type (see Rules Reference below)
2. **Read the target** source file/class/method
3. **Read dependencies**: Follow imports to read DTOs, entities, enums, custom exceptions, and other types referenced by the target (as specified in `code-context-analysis` rule)
4. **Check for existing tests**: Search for `{ClassName}Test` or `{ClassName}Tests` in the test directory (as specified in `existing-test-awareness` rule)
- If found, read fully — you will add missing tests to it, not create a new file
- If not found, scan 2-3 neighboring test classes to learn project conventions
### Step 2: Generate Test Cases
1. Analyze ALL code branches, including:
- Success paths
- Error/exception paths
- Validation logic
- Private/protected methods called by the target
- Security annotations (if present)
2. Apply the INCLUDE/EXCLUDE rules stri...
Details
- Author
- mavka-ai
- Repository
- mavka-ai/unit-tests-skills
- Created
- 6 months ago
- Last Updated
- yesterday
- Language
- Shell
- License
- MIT
Bundled in these plugins
Similar Skills
Semantically similar based on skill content — not just same category
Testing & QA Solid
generate-test-cases
Use when the user asks to analyze code for test coverage, list what test cases are needed, or review testing strategy — WITHOUT generating actual test code.
49 Updated yesterday
mavka-ai AI & Automation Featured
generate-tests
Generate comprehensive tests for specified code
5,772 Updated today
FlorianBruniaux AI & Automation Listed
test-gen
Use when unit or integration tests need to be written for a specific file or module.
1 Updated 1 weeks ago
MrCipherSmith