Test Writer (BATS)
The Test Writer skill provides context injection for creating comprehensive tests using the BATS (Bash Automated Testing System) framework.Overview
| Property | Value |
|---|---|
| Skill ID | ct-test-writer-bats |
| Tier | 2 (Execution) |
| Protocol | implementation |
| Tags | testing, bats, integration |
Capabilities
- Integration Tests - Test command workflows end-to-end
- Unit Tests - Test individual functions
- Fixture Creation - Create test data and mocks
- Error Case Testing - Verify error handling
When to Use
The dispatch algorithm selects ct-test-writer-bats for:- Tasks with keywords:
test,bats,coverage - Tasks labeled:
testing - Task type:
testing
Test Structure
Directory Layout
Basic Test File
BATS Assertions
Status Assertions
Output Assertions
File Assertions
Test Categories
Happy Path Tests
Error Handling Tests
Integration Tests
Test Isolation
Tests MUST be idempotent:Never
- Modify files outside TEST_DIR
- Depend on global state
- Assume test execution order
- Leave artifacts after test
Running Tests
Execution Flow
Related Skills
- Task Executor - Implements features to test
- Validator - Validates test coverage
- Library Implementer - Creates testable code
