test-generator
Generate Unit Tests Automatically
Também disponível em: Atyantik
Writing comprehensive unit tests is time-consuming and often incomplete. This skill analyzes your code and generates complete test suites with edge cases, error handling, and proper mocking.
Baixar o ZIP da skill
Upload no Claude
Vá em Configurações → Capacidades → Skills → Upload skill
Ative e comece a usar
Testar
A utilizar "test-generator". @test-generator src/utils/validator.js
Resultado esperado:
- Creates validator.test.js with:
- Tests for valid inputs
- Tests for invalid inputs
- Edge case tests (null, undefined, empty strings)
- Tests for each validation rule
- Mocked dependency tests
A utilizar "test-generator". @test-generator --coverage src/api/userService.ts
Resultado esperado:
- Generates userService.test.ts
- Includes coverage reporting setup
- Tests all public methods
- Adds integration test stubs
A utilizar "test-generator". @test-generator src/services/PaymentProcessor.py
Resultado esperado:
- Creates test_payment_processor.py
- Mocks external payment gateway
- Tests success and failure scenarios
- Validates error handling paths
Auditoria de Segurança
SeguroThis is a prompt-based skill containing only instructions for generating test code. The static findings are false positives: the analyzer misidentified metadata URLs as network calls, test-related terminology as cryptographic issues, and code examples as executable commands. No executable code, network access, file system access, or environment variable access exists.
Fatores de risco
🌐 Acesso à rede (1)
⚙️ Comandos externos (3)
Pontuação de qualidade
O Que Você Pode Construir
Legacy Code Test Coverage
Add tests to untested legacy codebases to improve reliability and enable refactoring.
New Feature Testing
Generate initial test suites for new features following team conventions.
Contribution Requirements
Create tests required for pull requests in projects with strict testing policies.
Tente Estes Prompts
@test-generator src/utils/calculator.js
@test-generator --coverage src/api/userService.ts
@test-generator --watch src/components/Button.jsx
@test-generator src/services/PaymentProcessor.py
Melhores Práticas
- Review generated tests to ensure they match your testing philosophy
- Add custom edge cases specific to your domain
- Use the generated tests as a starting point, not the final version
Evitar
- Blindly committing generated tests without review
- Using generated tests as a substitute for thinking about test design
- Generating tests for code that should be refactored first
Perguntas Frequentes
Which testing frameworks are supported?
Can it generate integration tests?
How does it handle external dependencies?
Will it overwrite existing tests?
Can I customize the test generation?
Is the generated code production-ready?
Detalhes do Desenvolvedor
Estrutura de arquivos
📄 SKILL.md