test-generator
Gerar boilerplate de testes pytest
Также доступно от: CuriousLearner
Escrever testes do zero leva tempo e requer seguir as convenções do projeto. Esta habilidade gera automaticamente modelos de teste abrangentes com o padrão AAA adequado, type hints e casos de teste parametrizados adaptados aos padrões do seu projeto.
Скачать ZIP навыка
Загрузить в Claude
Перейдите в Settings → Capabilities → Skills → Upload skill
Включите и начните использовать
Протестировать
Использование «test-generator». generate tests for src/utils.py - function format_name(first: str, last: str) -> str
Ожидаемый результат:
- Created: tests/test_utils.py
- Test class: TestFormatName
- Test cases: basic, valid input, invalid input, edge cases
- All tests follow AAA pattern with type hints
- Review TODO comments and add actual test data
Использование «test-generator». generate pytest fixture for database connection
Ожидаемый результат:
- Created: conftest.py entry
- Fixture name: db_connection
- Provides Generator[Database, None, None] with proper setup and teardown
- Add initialization parameters and cleanup logic
Аудит безопасности
БезопасноThis is a pure documentation skill containing only SKILL.md with usage instructions and 5 Jinja2-style templates for pytest test generation. No executable scripts, network calls, or file writes exist. All static findings are false positives: template variables like {module_name} were misidentified as cryptographic algorithms, markdown code block backticks were misidentified as shell execution, and documentation instructions like 'Read the source file' were misidentified as system reconnaissance.
Факторы риска
🌐 Доступ к сети (1)
📁 Доступ к файловой системе (1)
⚙️ Внешние команды (59)
Оценка качества
Что вы можете построить
Iniciar novos projetos TDD
Gerar modelos de teste antes de implementar novas funções ou classes
Impor padrões de teste
Criar padrões de teste consistentes entre repositórios da equipe
Construir cobertura de testes
Scaffold rapidamente arquivos de teste com modelos parametrizados e de casos extremos
Попробуйте эти промпты
generate tests for src/my_project/utils.py - function calculate_total(items: list[float]) -> float
generate tests for UserManager class with create_user and delete_user methods
generate async tests for fetch_user_data(user_id: str) -> dict function
generate parametrized tests for validate_email function with various valid and invalid email formats
Лучшие практики
- Sempre rode os testes gerados imediatamente para confirmar que falham (fase vermelha do TDD)
- Substitua todos os comentários TODO com dados reais de teste antes da implementação
- Use testes parametrizados para múltiplas combinações de entrada para maximizar a cobertura
Избегать
- Evite mocker funções internas ou validadores - use código real quando possível
- Não escreva testes que testem múltiplos comportamentos não relacionados em uma única função
- Evite excesso de mock: faça mock apenas de HTTP, banco de dados, I/O de arquivos, tempo e valores aleatórios
Часто задаваемые вопросы
Quais versões do Python são suportadas?
Quais frameworks de teste funcionam com os modelos?
Como integrar com suites de teste existentes?
Algum dado é armazenado ou enviado externamente?
Por que os testes gerados falham inicialmente?
Como isso se compara a outros geradores de testes?
Сведения для разработчиков
Автор
AtyantikЛицензия
MIT
Репозиторий
https://github.com/Atyantik/python-modern-template/tree/main/.claude/skills/test-generatorСсылка
main
Структура файлов