·test-harness
</>

test-harness

生成全面的 pytest 测试套件:快乐路径、边缘情况、错误条件、夹具脚手架、模拟策略和异步模式。分析函数签名、依赖链和复杂性热点,以生成可运行的参数化测试文件。触发:“生成测试”、“编写测试”、“测试这个函数”、“测试这个类”、“创建测试套件”、“我应该编写什么测试”、“pytest”、“单元测试”、“模拟策略”、“如何测试”、“测试覆盖率”、“编写测试文件”。当给定一个 Python 函数、类或模块并要求生成测试时,请使用此技能。

9安装·0热度·@mathews-tom

安装

$npx skills add https://github.com/mathews-tom/praxis-skills --skill test-harness

如何安装 test-harness

通过命令行快速安装 test-harness AI 技能到你的开发环境

  1. 打开终端: 打开你的终端或命令行工具(如 Terminal、iTerm、Windows Terminal 等)
  2. 运行安装命令: 复制并运行以下命令:npx skills add https://github.com/mathews-tom/praxis-skills --skill test-harness
  3. 验证安装: 安装完成后,技能将自动配置到你的 AI 编程环境中,可以在 Claude Code、Cursor 或 OpenClaw 中使用

来源:mathews-tom/praxis-skills。

SKILL.md

查看原文

Systematic test suite generation that transforms source code into comprehensive, runnable pytest files. Analyzes function signatures, dependency graphs, and complexity hotspots to produce tests covering happy paths, boundary conditions, error states, and async flows — with properly scoped fixtures and focused mocks.

| references/pytest-patterns.md | Fixture scopes, parametrize, marks, conftest layout, built-in fixtures | Always | | references/mock-strategies.md | Mock decision tree, patch boundaries, assertions, anti-patterns | Target has external dependencies |

| references/async-testing.md | pytest-asyncio modes, event loop fixtures, async mocking | Target contains async code | | references/fixture-design.md | Factory fixtures, yield teardown, scope selection, composition | Test requires non-trivial setup |

生成全面的 pytest 测试套件:快乐路径、边缘情况、错误条件、夹具脚手架、模拟策略和异步模式。分析函数签名、依赖链和复杂性热点,以生成可运行的参数化测试文件。触发:“生成测试”、“编写测试”、“测试这个函数”、“测试这个类”、“创建测试套件”、“我应该编写什么测试”、“pytest”、“单元测试”、“模拟策略”、“如何测试”、“测试覆盖率”、“编写测试文件”。当给定一个 Python 函数、类或模块并要求生成测试时,请使用此技能。 来源:mathews-tom/praxis-skills。

可引用信息

为搜索与 AI 引用准备的稳定字段与命令。

安装命令
npx skills add https://github.com/mathews-tom/praxis-skills --skill test-harness
分类
</>开发工具
认证
收录时间
2026-03-10
更新时间
2026-03-10

Browse more skills from mathews-tom/praxis-skills

快速解答

什么是 test-harness?

生成全面的 pytest 测试套件:快乐路径、边缘情况、错误条件、夹具脚手架、模拟策略和异步模式。分析函数签名、依赖链和复杂性热点,以生成可运行的参数化测试文件。触发:“生成测试”、“编写测试”、“测试这个函数”、“测试这个类”、“创建测试套件”、“我应该编写什么测试”、“pytest”、“单元测试”、“模拟策略”、“如何测试”、“测试覆盖率”、“编写测试文件”。当给定一个 Python 函数、类或模块并要求生成测试时,请使用此技能。 来源:mathews-tom/praxis-skills。

如何安装 test-harness?

打开你的终端或命令行工具(如 Terminal、iTerm、Windows Terminal 等) 复制并运行以下命令:npx skills add https://github.com/mathews-tom/praxis-skills --skill test-harness 安装完成后,技能将自动配置到你的 AI 编程环境中,可以在 Claude Code、Cursor 或 OpenClaw 中使用

这个 Skill 的源码在哪?

https://github.com/mathews-tom/praxis-skills