-
-
Notifications
You must be signed in to change notification settings - Fork 0
Test Generator
j0KZ edited this page Oct 9, 2025
·
3 revisions
Generate comprehensive test suites with edge cases and mocks.
Test Generator automatically creates comprehensive test files with edge cases, error handling, mocks, and high coverage. Supports Jest, Vitest, Mocha, and AVA frameworks.
Key Features:
- Smart test generation - Creates complete test suites automatically
- Edge case detection - Finds boundary conditions you might miss
- Mock generation - Auto-creates mocks for dependencies
- Coverage optimization - Targets high coverage with minimal tests
- Multiple frameworks - Jest, Vitest, Mocha, AVA support
Just ask naturally in your editor - works in English and Spanish:
"Generate tests for the calculatePrice function"
"Generar pruebas para la función calculatePrice"
"Add tests for the UserService class"
"Agregar pruebas para la clase UserService"
✓ Generated 15 test cases:
📊 Test Suite Created:
- Happy path tests: 5
- Edge cases: 6 (zero, negative, null, undefined)
- Error handling: 3
- Mock setup: Complete
📈 Estimated Coverage: 95%
- Branch coverage: 92%
- Statement coverage: 97%
- Function coverage: 100%"What test cases am I missing for login.js?"
"¿Qué casos de prueba me faltan para login.js?"
❌ Missing Test Cases:
Critical:
- Invalid email format validation
- Expired token handling
- SQL injection attempts
Important:
- Rate limiting behavior
- Concurrent login sessions
- Session timeout handling
Nice to Have:
- Password complexity edge cases
- Unicode character handling"Generate tests for all files in src/services/"
"Generar pruebas para todos los archivos en src/services/"
✓ Batch Test Generation Complete:
📦 Generated Tests:
- auth.test.ts (12 tests, 92% coverage)
- user.test.ts (8 tests, 95% coverage)
- payment.test.ts (15 tests, 88% coverage)
- database.test.ts (10 tests, 90% coverage)
📊 Total: 87 tests across 12 files
📈 Average Coverage: 91%
⏱️ Time Saved: ~2 hours of manual workGenerate comprehensive test suite for a source file with edge cases and error handling.
Parameters:
-
sourceFile(required) - Path to the source file -
config.framework(optional) -'jest'|'vitest'|'mocha'|'ava' -
config.coverage(optional) - Target coverage percentage (default: 90) -
config.includeEdgeCases(optional) - Include edge case tests (default: true) -
config.includeErrorCases(optional) - Include error handling tests (default: true)
Generate tests and write directly to a test file.
Parameters:
-
sourceFile(required) - Path to the source file -
testFile(optional) - Path for test file (auto-generated if not provided) -
config(optional) - Same asgenerate_tests
Generate tests for multiple files at once.
Parameters:
-
sourceFiles(required) - Array of source file paths -
config(optional) - Same asgenerate_tests
"Generate tests when I write this new authentication function"
"Generar pruebas cuando escribo esta nueva función de autenticación"
"Generate tests with 90% coverage for src/core/"
"Generar pruebas con 90% de cobertura para src/core/"
"Batch generate tests for all files in src/api/"
"Generar pruebas en lote para todos los archivos en src/api/"
Combine with other tools for powerful workflows:
- Smart Reviewer - Identify untested code, then generate tests
- Refactor Assistant - Refactor for testability, then generate tests
- Doc Generator - Generate tests and documentation together
- Quick Start Guide - Get started in 5 minutes
- Troubleshooting - Common issues
- Full Documentation - All tools
Need help? Open an issue | View documentation