testing-test-writing
编写聚焦的行为测试
团队经常添加脆弱的测试,这些测试反映的是实现细节,而不是用户行为。此技能指导 Claude、Codex 和 Claude Code 为关键工作流编写聚焦的测试。
使用我的智能体安装
将此请求复制给你的智能体,其中包含权威 Skill 页面和清单。
Review the Skillstore skill "testing-test-writing" from https://skillstore.io/skills/eis-its-testing-test-writing.md and its manifest at https://skillstore.io/api/skills/eis-its-testing-test-writing/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.你的智能体仍应展示其计划,并按安全策略请求必要确认。
Agent 可读资源
当 AI Agent、爬虫或脚本需要干净上下文,而不是读取完整页面时,请使用这些链接。
测试它
正在使用“testing-test-writing”。 请求:为结账工作流添加测试。
预期结果:
- 测试聚焦于成功结账、支付失败和购物车校验。
- 支付服务会被模拟,因为它是外部服务且速度较慢。
- 测试名称描述客户可见的结果。
正在使用“testing-test-writing”。 请求:评审脆弱的组件测试。
预期结果:
- 断言转向渲染行为和用户操作。
- 当内部状态检查无法证明用户价值时,将其移除。
- 在真实协作者稳定且快速的情况下减少模拟。
正在使用“testing-test-writing”。 请求:为新的 API 端点选择覆盖范围。
预期结果:
- 计划覆盖成功请求和主要校验失败。
- 数据库访问在单元测试中被模拟,并在一个集成路径中执行。
- 罕见边界情况被列为可选的后续测试。
安全审计
安全The only static finding is a hardcoded Markdown link in SKILL.md that uses parent-directory segments to reference a testing standards document. I did not find prompt injection, exfiltration intent, or executable behavior in the scanned file.
风险因素
📁 文件系统访问 (1)
分享与引用此报告
分享版本化评估报告、中性徽章、嵌入卡片和引用。Skillstore 只报告证据,不判断该 Skill 是否安全。
复制报告链接
https://skillstore.io/skills/eis-its-testing-test-writing/audits/10?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportMarkdown 徽章
[](https://skillstore.io/skills/eis-its-testing-test-writing?utm_source=security_passport_badge)HTML 徽章
<a href="https://skillstore.io/skills/eis-its-testing-test-writing?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/eis-its-testing-test-writing/security.svg" alt="Skillstore security assessment" loading="lazy"></a>嵌入卡片
<iframe src="https://skillstore.io/embed/skills/eis-its-testing-test-writing.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 引用
EIS-ITS. (2026). testing-test-writing security audit report (audit version 10) [Author version unspecified]. Skillstore. https://skillstore.io/skills/eis-its-testing-test-writing/audits/10BibTeX 引用
@techreport{eis-its-eis-its-testing-test-writing-2026,
author = {EIS-ITS},
title = {testing-test-writing security audit report (audit version 10)},
institution = {Skillstore},
year = {2026},
number = {10},
url = {https://skillstore.io/skills/eis-its-testing-test-writing/audits/10},
note = {Author version unspecified}
}CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "testing-test-writing security audit report (audit version 10)"
version: "unspecified"
type: report
authors:
- name: "EIS-ITS"
date-released: "2026-07-09"
url: "https://skillstore.io/skills/eis-its-testing-test-writing/audits/10"
identifiers:
- type: other
value: "skillstore:eis-its-testing-test-writing:audit:10"
description: "Skillstore immutable audit report identifier"
比较变体
2 个可安装变体每位作者的技能都保持为独立的可安装项。推荐变体按 Skillstore 证据排序。
为什么此变体排名第一
Skillstore 评分
评分依据 证据置信度: 高你能构建什么
添加功能测试
在构建新工作流后添加聚焦的测试,并使用描述用户可见行为的名称。
转换验收标准
将验收标准转化为面向业务关键路径的简洁单元测试和集成测试。
指导测试评审
在评审和重构期间设定一致的测试期望,而无需大范围重写测试。
试试这些提示
使用此技能为 [function or component] 编写一个最小化的单元测试。关注主要行为,并模拟外部依赖。
使用此技能为 [workflow] 规划测试。识别关键路径,选择覆盖类型,并避免实现细节。
使用此技能评审 [feature] 的现有测试。建议基于行为的名称,减少脆弱断言,并保留有用的覆盖。
使用此技能为 [feature] 设计聚焦的覆盖。区分主要工作流、失败处理、模拟、固件和范围外测试。
最佳实践
- 先从主要用户结果开始,再添加边界情况。
- 只模拟会让测试变慢、不稳定或依赖外部系统的依赖。
- 使用以通俗语言描述行为的测试名称。
避免
- 测试私有实现细节,而不是可观察行为。
- 在核心路径受到保护之前添加大范围边界情况测试套件。
- 使用过多模拟,从而掩盖真实的集成问题。