W Api Test

blockmatic/basilic-skills/skills/workflow/w-api-test

作者 blockmatic7e05e2abd052dc6b526e8a28e36d102d42bfd635无许可证1 个星标收录于 2026年10月9日更新于 2026年10月9日仓库6天前更新

Add API tests that exercise public HTTP behavior against existing harnesses.

AI 生成的概览

针对仓库现有测试框架,添加检验公开 HTTP 行为的 API 测试。

功能
该技能指导智能体通过公开接口编写 API 测试,使用仓库的 API 或 Playwright 测试框架来检验端点。测试覆盖所要求的操作、授权拒绝以及符合契约的响应,并使用包脚本提供的沙箱或本地服务器,同时清理创建的资源。随后运行文档中针对这些测试的 API 或 e2e 命令,并在行为或命令发生变化时指向文档技能。
适用场景
当仓库需要为 HTTP 端点新增 API 或端到端测试时使用,尤其是在已有测试框架和测试规格的情况下。它适用于必须避免生产系统与硬编码密钥的工作。
运行要求
需要仓库中已有的测试框架(API 或 Playwright)、可供阅读的现有测试规格或 API 测试文档,以及提供沙箱或本地服务器的包脚本。该技能不附带脚本,仅为说明性指令。

Test endpoints through the public interface using this repo's API or Playwright harness. Do not hit production. Do not hardcode secrets.

  1. Read the API testing MDX and existing *.test.ts or e2e specs.
  2. Cover the requested operations, authz denials, and contract-shaped responses.
  3. Use sandbox or local servers from package scripts. Clean up created resources.
  4. Run the documented API or e2e command for those tests.
  5. Docs: /w-docs if behavior or commands changed.

来源与署名

来源:blockmatic/basilic-skills位于skills/workflow/w-api-test提交7e05e2a

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架