coverage

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Coverage

覆盖率

What to cover

测量范围

Same two dimensions as the
run-tests
skill — test type, optionally narrowed to a module / group:
Coverage byTypical Gradle taskMeaning
all
(default)
jacocoTestReport
Both suites merged (
test
+
testIntgr
) — what the baseline is expressed in. Needs Docker.
unit
jacocoTestReport -x testIntgr
What the fast tests alone cover.
integration
jacocoTestReport -x test
What the Testcontainers tests alone cover. Needs Docker.
+ a module / group
--tests <glob>
, or a subproject path (
:web:test
)
Narrows any of the above to one package/class/subproject.
run-tests
技能的两个维度一致——测试类型,可选择性缩小至某个模块/组
覆盖率范围典型Gradle任务含义
all
(默认)
jacocoTestReport
合并两个测试套件(
test
+
testIntgr
)——基准值以此为标准。需要Docker。
unit
jacocoTestReport -x testIntgr
仅快速单元测试的覆盖范围。
integration
jacocoTestReport -x test
仅Testcontainers集成测试的覆盖范围。需要Docker。
+ 模块/组
--tests <glob>
,或子项目路径(
:web:test
将上述任一范围缩小至单个包/类/子项目。

Pick the path

选择执行路径

Probe FIRST, here, before loading either reference — so you read only the one you need. Call
steroid_list_projects
(via ToolSearch if the tool schema isn't loaded):
  • It returns the repo you're in → IDE path: note that entry's
    project_name
    and follow
    references/ide.md
    (runs the coverage Gradle task inside the IDE in its own Run tab). Its steps start already knowing the
    project_name
    — don't re-probe.
  • It fails, or the repo isn't listed → console Gradle path: follow
    references/gradle.md
    (runs Gradle in the console) and tell the user you used the console fallback because the IDE wasn't reachable.
Both paths end by collecting the result in a Haiku subagent that returns the
references/report.md
report and nothing else — keeping the long build/coverage output out of the main context. Act on that report in the main model.
在加载任一参考文档前,请先进行探测——这样你只需读取所需的文档。调用
steroid_list_projects
(若工具架构未加载,可通过ToolSearch调用):
  • 返回当前所在仓库 → IDE路径:记录该条目的
    project_name
    ,并遵循
    references/ide.md
    (在IDE内的独立运行标签页中执行覆盖率Gradle任务)。其步骤已预设
    project_name
    ——无需重复探测。
  • 探测失败,或仓库未被列出 → 控制台Gradle路径:遵循
    references/gradle.md
    (在控制台中运行Gradle),并告知用户因无法连接IDE而使用控制台 fallback 方案。
两种路径最终都会通过Haiku subagent收集结果,该子agent仅返回
references/report.md
报告,不会返回其他内容——避免冗长的构建/覆盖率输出占用主上下文。主模型可基于该报告执行后续操作。