proj-gen-test

Generate JUnit 5, Mockito, and AssertJ test templates for Java Spring Boot services and controllers.

93|27|Updated Jan 19, 2026
One-click install
npx skills add https://github.com/zhangloveyan/backend-skill --skill proj-gen-test
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: proj-gen-test
Source: https://github.com/zhangloveyan/backend-skill/tree/main/.claude/skills/proj-gen-test
Command: npx skills add https://github.com/zhangloveyan/backend-skill --skill proj-gen-test

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

该技能用于自动生成 Service 层与 Controller 层的单元测试和集成测试代码模板,提升测试覆盖率并加速开发流程。

Core Features & Use Cases

  • 生成 Service 层单元测试模板,覆盖核心业务逻辑。
  • 生成 Controller 层集成测试模板,验证接口行为和边界条件。
  • 提供 Mockito/JUnit 5/AssertJ 集成的测试骨架,便于快速实现测试。

Quick Start

输入待测试的模块信息以生成对应的测试模板。

Frequently Asked Questions about proj-gen-test

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

FAQPage Schema
How do I auto-generate unit tests for Spring Boot services?

You can auto-generate unit tests for Spring Boot services by inputting your module information to scaffold JUnit 5 test templates that cover core business logic. This provides a structured Mockito and AssertJ testing skeleton to accelerate development.

What is the best way to scaffold integration tests for Spring controllers?

The best way to scaffold integration tests for Spring controllers is using a template generator that verifies interface behavior and boundary conditions. It creates JUnit 5 and AssertJ integration test structures to validate your controller layer interactions.

Does this test generation work with Mockito and AssertJ in a Maven project?

Yes, test generation works with Mockito and AssertJ in a standard Maven project layout. It assumes standard Maven or Gradle project structures to properly insert the generated JUnit 5 test code templates into your testing directories.

Can I generate tests for both service and controller layers at the same time?

Yes, you can generate tests for both service and controller layers by providing the respective module information. It scaffolds unit tests for service business logic and integration tests for controller interface behavior simultaneously.

Why do I need to provide module information to generate Spring Boot test templates?

You need to provide module information so the generator can analyze your Java Spring Boot structure and insert the appropriate test code. This ensures the JUnit 5, Mockito, and AssertJ templates accurately match your specific service and controller components.