test-quality
仓库创建 2026年1月30日最近提交 5 个月前SkillHot 收录 23 天前
▸ 精选理由
能生成可维护、可读的测试用例,提升覆盖率与稳定性。
这个 Skill 做什么
为 Java 项目提供 JUnit5 + AssertJ 的高质量测试编写与审查指南。
帮助 Java 项目写出高质量的单元测试,采用 JUnit 5 + AssertJ 的现代做法,关注可维护性、清晰断言和边界场景。适合在新增测试、提升覆盖率或审查测试代码时使用。特别之处是结合最佳实践给出具体示例和改进建议,让测试既可靠又易读。
▸ 展开 SKILL.md 英文原文
Write high-quality JUnit 5 tests with AssertJ assertions. Use when user says "add tests", "write tests", "improve test coverage", or when reviewing/creating test classes for Java code.
692
Stars
135
Forks
18
仓库内 Skill
+20
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/decebals/claude-code-java/main/.claude/skills/test-quality/SKILL.md或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/decebals/claude-code-java/main/.claude/skills/test-quality/SKILL.md"SKILL.MD 节选查看完整文件 ↗
# Test Quality Skill (JUnit 5 + AssertJ)
Write high-quality, maintainable tests for Java projects using modern best practices.
## When to Use
- Writing new test classes
- Reviewing/improving existing tests
- User asks to "add tests" / "improve test coverage"
- Code review mentions missing tests
## Framework Preferences
### JUnit 5 (Jupiter)
```java
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Nested;
import static org.assertj.core.api.Assertions.*;
```
### AssertJ over standard assertions
✅ **Use AssertJ**:
```java
assertThat(plugin.getState())
.as("Plugin should be started after invia SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有