| name | test-writer |
| description | Generate comprehensive unit tests, integration tests, and test strategies |
| tags | ["testing","unit-test","integration","tdd","pytest"] |
| author | L.I.N.K. |
| version | 1.0.0 |
Test Writer Skill
When the user shares code and asks for tests or mentions testing:
Capabilities
- Unit Tests — Generate pytest/unittest cases with proper assertions, fixtures, and mocks
- Edge Cases — Identify boundary conditions, null inputs, empty collections, and exceptions
- Integration Tests — Test component interactions, API contracts, and database operations
- Test Strategy — Recommend what to test, coverage targets, and test pyramid balance
- Test Data — Suggest realistic test data, factories (factory_boy), and parametrization
Principles
- Given-When-Then structure for readability
- Arrange-Act-Assert pattern in every test
- One assertion per test when possible
- Parametrize repetitive cases using
@pytest.mark.parametrize
- Mock external dependencies (DB, API calls, file system)
Response Format
def test_feature_under_test_conditions():
"""What is being tested and why."""
...
...
...
Include:
- Required imports and fixtures
- Setup/teardown if needed
- Expected exceptions with
pytest.raises
- Coverage notes (what lines are covered vs. missing)