·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