gen-test

Generate Kotlin tests for UseCases, ViewModels, Mappers, and Repositories with Turbine and Mokkery.

11|Updated Mar 10, 2026
One-click install
npx skills add https://github.com/satanyakiv/NutriSport --skill gen-test-satanyakiv
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gen-test
Source: https://github.com/satanyakiv/NutriSport/tree/main/.claude/skills/gen-test
Command: npx skills add https://github.com/satanyakiv/NutriSport --skill gen-test-satanyakiv

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Writing tests for Kotlin classes can be time-consuming and inconsistent across modules. This skill provides a structured approach to generate tests that conform to NutriSport conventions, promoting consistency and coverage.

Core Features & Use Cases

  • Generate tests for UseCases, ViewModels, Mappers, and Repositories following NutriSport conventions.
  • Support both pure UseCase tests and ViewModel tests with Turbine/Mokkery, including flow testing when needed.
  • Guided process with examples, fake data factories, and testing patterns to accelerate test authoring.

Quick Start

Describe the Kotlin class and desired coverage, and ask this skill to generate the corresponding tests.

Frequently Asked Questions about gen-test

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate Kotlin unit tests for a ViewModel using Turbine and Mokkery?

Generate Kotlin ViewModel unit tests by providing the class description and desired coverage. The skill produces tests using Turbine for flow testing and Mokkery for mocking, covering both happy and error paths.

Can I auto-generate tests for Kotlin UseCases and Repositories with code coverage?

Yes, you can generate tests for pure UseCases and Repositories. Describe the Kotlin class and coverage requirements to receive structured test code that ensures consistent coverage across modules.

What is the best way to structure Kotlin tests for Mappers and UseCases?

Structuring Kotlin tests involves placing them under src/commonTest/kotlin. This skill generates structured test cases for Mappers and UseCases, utilizing fake data factories and established testing patterns.

Does this testing approach support flow testing for Kotlin ViewModels?

Yes, flow testing for Kotlin ViewModels is fully supported. The generated tests utilize Turbine to validate reactive stream emissions and Mokkery to mock dependencies.

Why should I use generated test patterns instead of writing Kotlin tests manually?

Writing Kotlin tests manually is time-consuming and often inconsistent. Using generated test patterns promotes consistency, accelerates authoring with fake data factories, and ensures standard conventions are followed.

What testing libraries do I need to run generated Kotlin test suites?

You need Kotlin test for core assertions, Turbine for flow testing, and Mokkery for mocking. The generated tests are structured to run under src/commonTest/kotlin.