About test-auto
A testing skill for creating test suites around the testing pyramid, from unit tests to end-to-end flows. It is intended for developers adding coverage, preparing refactors, or setting up test pipelines.
Key features
- 01Unit, integration, and E2E test planning
- 02Arrange-Act-Assert test structure
- 03Mocks, stubs, and test data factories
- 04Coverage configuration and CI integration
Use cases
- 01Add tests for a new module
- 02Build test coverage before refactoring
- 03Set up project testing and CI pipelines
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ htlin222/ dotfiles --skill test-autoAfter installing, type/test-autoin Claude Code to confirm it loaded.
Details
From the project READMETest Automation
Create comprehensive test suites following the testing pyramid.
When to Use
- Setting up tests for new code
- User asks to "add tests" or "improve coverage"
- Before refactoring (add tests first)
- Implementing CI/CD test pipelines
Testing Pyramid
/\ E2E (few, critical paths)
/ \ Integration (moderate)
/____\ Unit (many, fast)
Test Structure
Unit Tests
- Test individual functions/methods
- Mock external dependencies
- Fast execution (<100ms per test)
- High coverage (>80%)
Integration Tests
- Test component interactions
- Use test databases/containers
- Moderate execution time
- Cover critical integrations
E2E Tests
- Test complete user flows
- Use Playwright/Cypress
- Slowest execution
- Cover happy paths only
Test Patterns
// Arrange-Act-Assert
describe("UserService", () => {
it("should create user with valid data", async () => {
// Arrange
const userData = { name: "Test", email: "[email protected]" };
// Act
const result = await userService.create(userData);
// Assert
expect(result.id).toBeDefined();
expect(result.name).toBe("Test");
});
});
Output
- Test files with clear naming
- Mock/stub implementations
- Test data factories
- Coverage configuration
- CI pipeline integration
Examples
Input: "Add tests for the auth module" Action: Analyze auth module, create unit tests for functions, integration tests for flows
Input: "Set up testing for this project" Action: Detect framework, configure test runner, create example tests, add CI config
Comments
Markdown supported