test-generator
Installation
SKILL.md
測試生成技能
靜態分析
| 工具 | 用途 | 命令 |
|---|---|---|
| ruff | Linter + Formatter | uv run ruff check src/ --fix && uv run ruff format src/ |
| mypy | 類型檢查 | uv run mypy src/ --ignore-missing-imports |
| bandit | 安全掃描 | uv run bandit -r src/ -ll |
| vulture | 死代碼檢測 | uv run vulture src/ --min-confidence 80 |
完整:uv run ruff check src/; uv run mypy src/ --ignore-missing-imports; uv run bandit -r src/ -ll
測試金字塔
| 層級 | 工具 | 目錄 |
|---|---|---|
| Unit | pytest | tests/unit/ |
| Integration | pytest + httpx | tests/integration/ |
| E2E | playwright | tests/e2e/ |
| Coverage | pytest-cov | 目標 ≥80% |
單元測試必涵蓋
- Happy Path — 正常流程
- Edge Cases — 邊界條件
- Error Handling —
pytest.raises - Parametrize —
@pytest.mark.parametrize
執行命令
pytest tests/unit -v # 單元
pytest tests/integration -v -m integration # 整合
pytest --cov=src --cov-report=term-missing --cov-fail-under=80 # 覆蓋率
Checklist
- Happy path + edge cases + error handling
- Fixtures 設定(conftest.py)
- 覆蓋率 ≥ 80%
- CI workflow 整合
Related skills
More from u9401066/med-paper-assistant
draft-writing
|
29literature-review
系統性文獻搜尋、篩選、下載、整理。觸發:文獻回顧、找論文、搜尋文獻、systematic review、literature search、PubMed、找文章、搜paper、review、reference、citation、引用、參考文獻、背景調查、background。
29roadmap-updater
更新 ROADMAP.md 狀態。觸發:roadmap、路線、規劃、里程碑。
25project-management
|
24memory-updater
更新 Memory Bank 檔案。觸發:memory、記憶、進度、存檔、sync、做到哪。
23readme-updater
更新 README.md。觸發:readme、說明、文檔、怎麼用、安裝說明。
23