unit-test-generation

Generate backend unit and integration tests for the AgenticCPS ruoyi-vue-pro project.

15|5|Updated Mar 19, 2026
One-click install
npx skills add https://github.com/zhuangpengLI/AgenticCPS --skill unit-test-generation-zhuangpengli
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unit-test-generation
Source: https://github.com/zhuangpengLI/AgenticCPS/tree/main/.qoder/skills/unit-test-generation
Command: npx skills add https://github.com/zhuangpengLI/AgenticCPS --skill unit-test-generation-zhuangpengli

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

生成符合 AgenticCPS 后端测试规范的单元测试和集成测试代码,提升代码质量与回归安全性。

Core Features & Use Cases

  • 依据项目规范自动生成测试骨架、测试用例模板和 Test.java 文件,覆盖常见场景(CRUD、分页、异常路径等)。
  • 支持对 ruoyi-vue-pro 后端模块的单元测试和集成测试,兼容数据库、Mock 对象与 Redis 的场景。
  • 提供详细的随机数据生成与断言示例,确保测试数据的一致性与可重复性。

Quick Start

Use this Skill to generate backend unit and integration tests according to the project's testing conventions.

Frequently Asked Questions about unit-test-generation

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

FAQPage Schema
How do I generate backend unit tests for a ruoyi-vue-pro project?

To generate backend unit tests for a ruoyi-vue-pro project, this Skill outputs standardized Test.java files that inherit BaseDbUnitTest or BaseMockitoUnitTest, covering services, mappers, and controllers.

Can I auto-generate integration tests that involve databases and Redis?

Yes, you can auto-generate integration tests for database and Redis scenarios. The Skill creates test templates compatible with these environments, utilizing mocking and random data utilities to ensure consistent test execution.

What is the standard structure for backend test generation in this project?

The standard structure for backend test generation involves inheriting BaseDbUnitTest or BaseMockitoUnitTest, applying prescribed test templates, and using random data utilities to cover CRUD, pagination, and exception paths.

How to create test cases covering exception paths and CRUD operations?

To create test cases covering exception paths and CRUD operations, the Skill generates comprehensive test skeletons and templates that automatically include these scenarios alongside random data generation and assertions.

Does this test generation approach work with Mockito for mocking objects?

Yes, this test generation approach works with Mockito for mocking objects by extending the BaseMockitoUnitTest class, allowing you to isolate services and controllers without a live database environment.

When should I not use auto-generated test templates?

You should not use auto-generated test templates when your testing scenarios deviate significantly from standard CRUD, pagination, and exception paths, as the generated skeletons are tailored specifically to the ruoyi-vue-pro project conventions.