The Test Generator skill automates the creation of comprehensive unit, integration, and E2E tests to ensure robust code quality and high coverage. It streamlines the testing lifecycle by generating structured test suites using the AAA (Arrange, Act, Assert) pattern across modern frameworks like Vitest and Playwright, helping developers identify edge cases and error paths early in the development process.
Use Cases
Automated Unit Test Generation: Rapidly create test suites for new functions and modules to verify logic correctness and prevent regressions.
Code Coverage Optimization: Analyze existing codebases to generate missing test cases for edge cases, null inputs, and complex error-handling branches to meet strict coverage targets.
Testing Framework Initialization: Quickly set up testing environments and boilerplate code for Vitest, Playwright, or Testing Library in new or existing projects.
TDD Workflow Acceleration: Support Test-Driven Development by generating test structures and assertions based on functional requirements before the implementation code is written.
Asynchronous and API Testing: Simplify the creation of complex async tests and mock configurations for external dependencies and API endpoints.
name
test-generator
description
Generate comprehensive unit tests for code. Use when creating tests, improving test coverage, or setting up testing frameworks.
allowed-tools
Bash, Read, Write, Grep, Glob
Test Generator
Version: 1.0.0
Purpose: Generate comprehensive tests with high coverage