test-gen_skill

This skill generates comprehensive, maintainable unit tests for Kotlin code files, covering happy paths, edge cases, and errors with clear naming.
  • Kotlin

4.4k

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill phodal/auto-dev --skill test-gen

  • SKILL.md594 B

Overview

This skill generates comprehensive, maintainable unit tests for Kotlin code files. It produces organized test suites following Arrange-Act-Assert and targets high coverage across happy paths, edge cases, and error cases. The output emphasizes clear naming, fast execution, and independent, repeatable tests. It supports constructor, method, exception, boundary, and integration-point tests.

How this skill works

You provide the code file or signature and the skill inspects public and internal APIs to identify units to test. It synthesizes test cases that exercise constructors, methods, and interaction points, including positive flows and failure modes. Tests are organized into descriptive suites and methods with setup and teardown scaffolding as needed. The skill outputs ready-to-run Kotlin test code compatible with common test frameworks.

When to use it

  • Adding tests to legacy or untested Kotlin modules
  • Before merging significant feature work to prevent regressions
  • To harden error handling and boundary conditions
  • When adopting or enforcing test standards across a codebase
  • During test-driven development to accelerate test creation

Best practices

  • Follow Arrange-Act-Assert structure consistently in each generated test
  • Prefer small, focused tests that validate one behavior per test
  • Use descriptive, actionable test names that express expected behavior
  • Mock or stub external dependencies to keep tests fast and isolated
  • Include edge and error cases in every test suite for robust coverage

Example use cases

  • Generate constructor tests that validate default state and invalid arguments
  • Create method behavior tests covering normal flows and return values
  • Produce exception handling tests that assert thrown exceptions and messages
  • Build boundary condition tests for limits, nulls, and empty collections
  • Scaffold integration-point tests for interactions with collaborators or I/O

FAQ

Yes. Specify the preferred Kotlin testing framework (JUnit, Kotest, MockK) and the generated tests will follow that style.

Will generated tests run reliably in CI?

Tests are designed to be independent and fast. External I/O is mocked or isolated so suites are suitable for CI, but you should review and adapt environment-specific setup as needed.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
test-gen skill by phodal/auto-dev | VeilStrat