| name | kta-unit-test |
| description | Smart Kotlin unit testing with auto-detection, coverage analysis, and AI edge cases. Use when generating tests for biz/ layer classes, analyzing test coverage gaps, or discovering edge cases. |
Platform Tooling
- Use AskUserQuestion for blocking user choices or confirmations.
- Use WebFetch/WebSearch for current external docs or public web research.
- Use Task tool with subagent_type for delegation.
- Use Skill tool when chaining to another installed skill.
Kotlin Unit Test
Project-specific skill for intelligent Kotlin unit testing.
When to Use
- Generating tests for business logic classes (biz/ layer)
- Analyzing test coverage gaps
- Discovering edge cases for existing code
- Before writing new tests to understand what's missing
Workflow
- Analyze class:
python scripts/analyze_kotlin.py units <file.kt>
- Check coverage:
python scripts/analyze_kotlin.py coverage <source_dir> <test_dir>
- Discover edge cases: Load
references/edge-case-discovery.md
- Write tests: Follow patterns in
references/test-patterns.md
Script Commands
python scripts/analyze_kotlin.py units app/src/main/.../SomeClass.kt
python scripts/analyze_kotlin.py coverage app/src/main/java/.../biz app/src/test/java/.../biz
Output Format
JSON structured output for parsing:
{
"class_name": "SomeClass",
"methods": [...],
"dependencies": [...],
"coverage": {"tested": [], "missing": []}
}
References
| File | Purpose |
|---|
references/test-patterns.md | JUnit4 + MockK + Turbine patterns |
references/edge-case-discovery.md | AI prompts for finding edge cases |
Integration
This skill is standalone. If a dedicated kta-* test agent is added later, use the platform
delegation capability and keep that agent in the ai/kta/agents manifest.