scenario-testing
使用场景测试验证功能
功能开发可能通过浅层测试,却在真实系统中失败。此技能指导 Claude、Codex 和 Claude Code 通过场景测试和记录在案的真实依赖检查来证明行为正确。
使用我的智能体安装
将此请求复制给你的智能体,其中包含权威 Skill 页面和清单。
Review the Skillstore skill "scenario-testing" from https://skillstore.io/skills/2389-research-scenario-testing.md and its manifest at https://skillstore.io/api/skills/2389-research-scenario-testing/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.你的智能体仍应展示其计划,并按安全策略请求必要确认。
Agent 可读资源
当 AI Agent、爬虫或脚本需要干净上下文,而不是读取完整页面时,请使用这些链接。
测试它
正在使用“scenario-testing”。 在发布前验证用户注册工作流。
预期结果:
一个 .scratch/ 场景计划,使用真实数据库、测试模式下的真实认证服务、预期成功标准和清理说明。
正在使用“scenario-testing”。 将重复出现的结账验证转换为共享覆盖。
预期结果:
一个记录在案的场景模式,包含清晰的 given、when、then 流程,以及它所验证的业务行为列表。
正在使用“scenario-testing”。 审查已完成的缺陷修复是否缺少验证。
预期结果:
一份差距报告,列出缺失的真实依赖检查、无效的 mock,以及在声明修复完成之前所需的场景。
安全审计
中风险All static analyzer matches for Ruby or shell backtick execution are false positives caused by Markdown inline-code formatting. The system reconnaissance matches are also false positives, but the skill does have a medium contextual risk because it encourages real credential requests and real service execution without clear safeguards.
已确认安全问题 (1)
风险因素
分享与引用此报告
分享版本化评估报告、中性徽章、嵌入卡片和引用。Skillstore 只报告证据,不判断该 Skill 是否安全。
复制报告链接
https://skillstore.io/skills/2389-research-scenario-testing/audits/7?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportMarkdown 徽章
[](https://skillstore.io/skills/2389-research-scenario-testing?utm_source=security_passport_badge)HTML 徽章
<a href="https://skillstore.io/skills/2389-research-scenario-testing?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/2389-research-scenario-testing/security.svg" alt="Skillstore security assessment" loading="lazy"></a>嵌入卡片
<iframe src="https://skillstore.io/embed/skills/2389-research-scenario-testing.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 引用
2389-research. (2026). scenario-testing security audit report (audit version 7) [Author version unspecified]. Skillstore. https://skillstore.io/skills/2389-research-scenario-testing/audits/7BibTeX 引用
@techreport{2389-research-2389-research-scenario-testing-2026,
author = {2389-research},
title = {scenario-testing security audit report (audit version 7)},
institution = {Skillstore},
year = {2026},
number = {7},
url = {https://skillstore.io/skills/2389-research-scenario-testing/audits/7},
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: "scenario-testing security audit report (audit version 7)"
version: "unspecified"
type: report
authors:
- name: "2389-research"
date-released: "2026-07-04"
url: "https://skillstore.io/skills/2389-research-scenario-testing/audits/7"
identifiers:
- type: other
value: "skillstore:2389-research-scenario-testing:audit:7"
description: "Skillstore immutable audit report identifier"
Skillstore 评分
评分依据 证据置信度: 高你能构建什么
验证后端功能行为
在将新的 API、工作流或数据库支持的变更标记为完成之前,创建一个真实依赖场景。
将缺陷修复转化为可重复覆盖
复现已报告的故障,通过场景验证修复,并记录该模式以供未来回归检查使用。
在交付过程中指导 AI 代理
让 Claude、Codex 或 Claude Code 专注于证明行为确实可用,而不是停留在孤立的单元测试上。
试试这些提示
Use scenario-testing to design a .scratch/ scenario for this feature. Include the real dependencies it must exercise and the pass condition.
Use scenario-testing to reproduce this bug with real dependencies, verify the fix, and list what makes the scenario independent.
Use scenario-testing to extract the validated scenario into a scenarios.jsonl entry with name, given, when, then, and validates fields.
Use scenario-testing to review this change set for missing real-dependency scenarios, invalid mock usage, and unresolved validation gaps.
最佳实践
- 当需要真实外部系统时,使用沙盒或测试模式服务。
- 保持每个场景相互独立,使其可以单独运行并并行运行。
- 将 scratch 场景中的稳定经验移入已提交的场景文档。
避免
- 将 mocked 单元测试视为功能可端到端工作的证明。
- 运行依赖于早期测试执行中隐藏状态的场景。
- 请求或暴露生产密钥,而不是使用已批准的测试凭据。
常见问题
此技能会为我编写测试代码吗?
我可以在此技能中使用 mock 吗?
.scratch/ 用来做什么?
scenarios.jsonl 中应该放什么?
这需要生产服务吗?
哪些工具可以使用此技能?
开发者详情
许可证
MIT
Skillstore 修订
r1
版本提示
作者未声明版本。
引用
14dc8f201a64f8d30fd131d7f036cd5e788be523
维护新鲜度
2026/7/23
使用量
12 次下载 · 193 次浏览
文件结构
📄 SKILL.md