test-coverage-advisor
改进 Rust 测试覆盖率
缺失测试会让 Rust 的错误路径和边界情况缺乏保护。此技能会审查代码和测试,然后建议有针对性的覆盖率改进。
使用我的智能体安装
将此请求复制给你的智能体,其中包含权威 Skill 页面和清单。
Review the Skillstore skill "test-coverage-advisor" from https://skillstore.io/skills/emillindfors-test-coverage-advisor.md and its manifest at https://skillstore.io/api/skills/emillindfors-test-coverage-advisor/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.你的智能体仍应展示其计划,并按安全策略请求必要确认。
Agent 可读资源
当 AI Agent、爬虫或脚本需要干净上下文,而不是读取完整页面时,请使用这些链接。
测试它
正在使用“test-coverage-advisor”。 一个 validate_email 函数只有一个成功测试。
预期结果:
建议的覆盖率:空输入、缺少 at 符号、缺少域名,以及一组有效和无效地址的表格。
正在使用“test-coverage-advisor”。 一个 async 仓库查找没有失败测试。
预期结果:
推荐测试:找到用户、缺失用户、仓库错误,以及在支持时测试超时或取消行为。
正在使用“test-coverage-advisor”。 一个测试模块包含大量设置代码,但没有明确断言。
预期结果:
重构指导:按行为拆分测试,每个测试只保留一个原因,并为可观察结果添加明确断言。
安全审计
安全The static command findings are false positives caused by Markdown code fences in Rust and bash examples, not executable code. The blocker findings are sample email addresses in a table-driven test example. I found no evidence of prompt injection, data exfiltration, unauthorized network use, or tool instructions beyond Read/Grep/Glob.
风险因素
⚙️ 外部命令 (25)
分享与引用此报告
分享版本化评估报告、中性徽章、嵌入卡片和引用。Skillstore 只报告证据,不判断该 Skill 是否安全。
复制报告链接
https://skillstore.io/skills/emillindfors-test-coverage-advisor/audits/4?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportMarkdown 徽章
[](https://skillstore.io/skills/emillindfors-test-coverage-advisor?utm_source=security_passport_badge)HTML 徽章
<a href="https://skillstore.io/skills/emillindfors-test-coverage-advisor?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/emillindfors-test-coverage-advisor/security.svg" alt="Skillstore security assessment" loading="lazy"></a>嵌入卡片
<iframe src="https://skillstore.io/embed/skills/emillindfors-test-coverage-advisor.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>学术引用 (APA · BibTeX · CFF)
APA 引用
EmilLindfors. (2026). test-coverage-advisor security audit report (audit version 4) [Author version 1.0.0]. Skillstore. https://skillstore.io/skills/emillindfors-test-coverage-advisor/audits/4BibTeX 引用
@techreport{emillindfors-emillindfors-test-coverage-advisor-2026,
author = {EmilLindfors},
title = {test-coverage-advisor security audit report (audit version 4)},
institution = {Skillstore},
year = {2026},
number = {4},
url = {https://skillstore.io/skills/emillindfors-test-coverage-advisor/audits/4},
note = {Author version 1.0.0}
}CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "test-coverage-advisor security audit report (audit version 4)"
version: "1.0.0"
type: report
authors:
- name: "EmilLindfors"
date-released: "2026-07-06"
url: "https://skillstore.io/skills/emillindfors-test-coverage-advisor/audits/4"
identifiers:
- type: other
value: "skillstore:emillindfors-test-coverage-advisor:audit:4"
description: "Skillstore immutable audit report identifier"
Skillstore 评分
评分依据 证据置信度: 高你能构建什么
为新的 Rust 代码添加测试
在功能合并前识别缺失的成功、失败和边界测试。
审查 Pull Request 覆盖率
检查某项变更是否为错误路径和边界情况包含了足够的测试。
规划回归覆盖率
将 bug 报告或高风险行为转化为聚焦的回归测试想法。
试试这些提示
审查这个 Rust 函数,并建议缺失的成功、错误和边界情况测试:[paste code]。
审查这个 Rust 测试模块。识别缺失的断言、错误路径,以及使用表驱动测试的机会:[paste tests]。
分析这个 async Rust API,并针对成功、失败、超时和未找到行为提出测试:[paste code]。
评估这个功能实现和测试。优先列出风险最高的缺失用例,并解释每个测试为何重要:[paste files or summary]。
最佳实践
- 分享最小相关函数或测试模块,以便建议更具体。
- 在请求覆盖率建议时包含预期错误类型和业务规则。
- 当一个功能有许多可能的边界情况时,请求按优先级列出缺口。
避免
- 将此技能用作运行测试和覆盖率工具的替代品。
- 在不展示代码或行为规则的情况下请求宽泛的覆盖率建议。
- 在未检查领域正确性的情况下接受生成的测试想法。
常见问题
此技能会运行覆盖率工具吗?
它是为哪种语言设计的?
它能编写完整测试吗?
它能检测每个缺失的边界情况吗?
它能帮助改进现有测试吗?
它可以安全地用于私有代码吗?
开发者详情
作者
EmilLindfors许可证
MIT
作者版本
v1.0.0
Skillstore 修订
r1
引用
a06681402992ceae98ba04d54cfd4ab004862696
维护新鲜度
2026/7/18
使用量
5 次下载 · 226 次浏览
文件结构
📄 SKILL.md