test-harness
Test Harness builds complete pytest test files from source code, automatically structuring tests across happy paths, edge cases, and error states. It designs fixtures by scope, applies focused mocks to external dependencies, and handles async patterns—all grounded in reconnaissance of your code's complexity and existing test coverage.
Test Harness generates comprehensive pytest test suites with fixtures, mocks, and systematic coverage of happy paths, boundaries, and error conditions.
AI-generated summary based on this skill's SKILL.md
Install
Mathews-Tom/armory/test-harness · repository language: Python
git clone https://github.com/Mathews-Tom/armory
cp -r armory/skills/test-harness ~/.claude/skills/test-harnessnpx skillfed install Mathews-Tom/armory/test-harnessFrequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
How does test-harness generate pytest tests for my function?
Test Harness builds complete pytest test files from source code, automatically structuring tests across happy paths, edge cases, and error states. It analyzes your function's complexity and existing coverage, then generates organized test suites with fixtures by scope, focused mocks for external dependencies, and proper async handling—all following pytest best practices.
Can test-harness create test suite with mocks for external APIs?
Yes. Test Harness designs mock strategies tailored to your dependencies, applying focused mocks to external APIs and services. It scaffolds fixtures at the appropriate scope (function, class, session) and configures conftest setup to handle dependency injection, so your tests remain isolated and deterministic.
What does test-harness do for edge cases and error conditions?
Test Harness creates tests covering happy paths, edge cases, and error conditions systematically. It generates parametrized test cases for boundary conditions, exception handling, and failure modes, ensuring your test suite captures the full range of your code's behavior without manual enumeration.
How does test-harness handle async code testing?
Test Harness recognizes async patterns in your code and designs appropriate mock and fixture strategies for async functions. It generates tests using pytest-asyncio conventions, properly awaiting coroutines and mocking async dependencies so your async test suite runs reliably.
Does test-harness scaffold pytest fixtures and conftest setup?
Yes. Test Harness scaffolds test infrastructure by designing fixtures at the right scope, generating conftest configurations, and setting up dependency injection patterns. This foundational work reduces boilerplate and ensures your test harness is maintainable and extensible from the start.
Can test-harness generate unit tests automatically for untested code?
Test Harness analyzes your source code to generate comprehensive unit tests automatically, building test files that cover happy paths, edge cases, and error states. It applies pytest best practices and fixture patterns, creating a complete test suite scaffold you can refine and extend.
SKILL.md
rendered from the published skill — quoted content, verbatim
Test Harness
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.
Reference Files
| File | Contents | Load When |
|---|---|---|
references/pytest-patterns.md |
Fixture scopes, parametrize, marks, conftest layout, built-in |
(truncated - see the full file via the links below)
Read as markdown · JSON record · Browse the source repository
File tree — 8 files
skills/test-harness/SKILL.md
skills/test-harness/evals/cases.yaml
skills/test-harness/evals/fixtures/sample_module.py
skills/test-harness/references/async-testing.md
skills/test-harness/references/coverage-targets.md
skills/test-harness/references/fixture-design.md
skills/test-harness/references/mock-strategies.md
skills/test-harness/references/pytest-patterns.md