API Test Pytest

解析多格式接口定义,生成 Pytest 接口自动化脚本。

thedixitjain 2582fdf 24 files · 22.1 KB Updated 2 repo stars

File contents

API 测试(Pytest)(中文版)

英文版: 见对应英文技能。

何时使用

  • 需要把 API 测试结果落到 pytest 自动化结构里。
  • 项目偏 Python,或希望输出直接适配 pytest。

输出格式选项

默认使用 Markdown,除非需求明确要求其他格式。

如何使用

  1. 打开 prompts/api-test-pytest.md,把它作为主提示词使用。
  2. 补充真实项目上下文:范围、环境、限制、风险、依赖和期望产出。
  3. 如果输入不完整,先给出可用初版,并标出信息缺口和假设。

参考文件

  • prompts/api-test-pytest.md:本技能的主提示词。
  • references/:按需查看的补充说明。
  • examples/:示例输入或输出。
  • scripts/:本技能相关的辅助脚本或转换脚本。

常见误区

  • 不要在范围和上下文都不清楚时直接使用。
  • 不要把所有内容都当成同等重要。
  • 不要跳过假设和信息缺口。

最佳实践

  • 先从提示词正文出发,再补真正影响结果的上下文。
  • 结果要按风险聚焦,而且能直接执行。
  • 如果信息不全,先给可用初版,并把缺口标出来。

Source: naodeng/awesome-qa-skillsskills/zh/testing-types/api-test-pytest/SKILL.md

thedixitjain/the-mega-skill-library/tree/main/library/testing-and-qa/api-test-pytest--naodeng commit 2582fdf34d

Frequently asked questions

npx skillmds add thedixitjain/api-test-pytest-2