spring-test-generator

Generate BDD-style Spring Boot 3.x test suites with given/when/then.

Updated Jan 27, 2026
One-click install
npx skills add https://github.com/scit-48-1/aini-inu-backend --skill spring-test-generator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: spring-test-generator
Source: https://github.com/scit-48-1/aini-inu-backend/tree/main/.gemini/skills/spring-test-generator
Command: npx skills add https://github.com/scit-48-1/aini-inu-backend --skill spring-test-generator

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Generate comprehensive, convention-driven tests for Spring Boot 3.x backends using BDD style, enabling consistent test coverage across services, controllers, and repositories.

Core Features & Use Cases

  • Generate unit tests for services and repositories using Mockito.
  • Create slice tests with WebMvcTest and DataJpaTest for controllers and repositories.
  • Create integration tests with SpringBootTest for end-to-end flow.
  • Adhere to DisplayName, Nested, and given/when/then patterns to improve readability.

Quick Start

Provide a target Spring context (e.g., PetService or PetController) and ask the generator to create a complete test suite following the given/when/then pattern with Korean @DisplayName.

Frequently Asked Questions about spring-test-generator

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

FAQPage Schema
How do I generate BDD style tests for a Spring Boot 3.x backend?

To generate BDD style tests for a Spring Boot 3.x backend, provide your target component like a service or controller to the generator. It produces a standardized test suite using given/when/then patterns, @DisplayName, and @Nested annotations for improved readability.

What is the best way to write slice tests for Spring Boot controllers and repositories?

The best way to write slice tests for Spring Boot controllers and repositories is to use targeted testing annotations. This generator creates slice tests using @WebMvcTest for controllers and @DataJpaTest for repositories, ensuring isolated component validation.

Can I use Mockito for unit testing Spring Boot services with this approach?

Yes, you can use Mockito for unit testing Spring Boot services with this approach. The generator produces unit tests for services and repositories that utilize Mockito to mock dependencies and isolate the specific business logic under test.

Does this test generation method support integration tests for end-to-end Spring Boot flows?

Yes, this test generation method supports integration tests for end-to-end Spring Boot flows. It creates comprehensive integration tests using @SpringBootTest to validate the full application context and interactions across all architectural layers.

How do I structure Spring Boot tests using given/when/then patterns and @Nested classes?

To structure Spring Boot tests using given/when/then patterns and @Nested classes, the generator enforces behavior-driven development conventions. It groups related test scenarios within @Nested classes and uses @DisplayName for clear, readable test documentation.

What are the limitations of generating tests for Spring Boot backends using BDD style?

A limitation of generating tests for Spring Boot backends using BDD style is that it strictly targets Spring Boot 3.x conventions. It requires providing a specific Spring context like PetService or PetController and focuses on service, repository, and controller layers.