Pytest Workflow
Trigger Boundary
- •Use when Python verification is implemented with pytest.
- •Do not use for framework-agnostic test strategy only; use
testing-*skills. - •Do not use for load/performance benchmarking scripts.
Goal
Create fast, reliable, and debuggable pytest suites aligned with change risk.
Inputs
- •Change scope and risk profile
- •Existing fixture and test structure
- •Environment and data setup constraints
Outputs
- •Test case matrix with fixture strategy
- •Parametrized tests for boundary and error scenarios
- •Failure triage notes with reproducible commands
Workflow
- •Map behavior risks to unit/integration pytest scopes.
- •Build reusable fixtures with explicit lifecycle.
- •Use parametrization for edge-case coverage without duplication.
- •Keep assertions specific and failure messages actionable.
- •Optimize runtime by isolating slow tests and markers.
Quality Gates
- •Fixtures are deterministic and avoid hidden global state.
- •Parametrization improves coverage without unreadable tests.
- •Test failures point to a single clear cause.
- •Test runtime remains practical for local and CI execution.
Failure Handling
- •Stop when fixtures produce non-deterministic outcomes.
- •Escalate when test runtime blocks practical feedback loops.