Skip to main content
在 Manus 中运行任何 Skill
一键导入

java-ut-coverage-loop

星标4
分支1
更新时间2026年5月28日 08:02

Generate JUnit 5 + Mockito + AssertJ unit tests for a Java class, run them via Maven + JaCoCo, and iteratively expand the test code based on coverage feedback until line ≥ 80% and branch ≥ 70% are met. The skill never modifies production code (only creates or edits files under src/test/java). Use when the user asks to "add unit tests for", "improve UT coverage of", "write tests until coverage hits X%", "generate tests for a class", "提升单测覆盖率", "给某个类补单测", or names a Java SUT and asks for tests with a coverage target. Scope is one production class at a time. Works on any Maven project: if the jacoco-maven-plugin is configured the skill uses it, otherwise it injects the JaCoCo agent at the command line without touching pom.xml.

安装

用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。

SKILL.md
readonly