generating-tests
БесплатноЗапускает вложенные скриптыНе проверенGenerates xUnit tests for C#/.NET ABP Framework code using NSubstitute and Shouldly. Use when the user asks to generate tests, create test coverage, write…
от thapaliyabikendra★ 25 звёзд на GitHubОб этом скилле
Generating Tests
Generate xUnit tests for C#/.NET ABP Framework projects.
Quick Start
# Analyze source and generate tests
python scripts/generate_tests.py src/MyAppService.cs --type unit
Workflow
Copy this checklist and track progress:
Test Generation Progress:
- [ ] Step 1: Locate source file
- [ ] Step 2: Analyze public methods and dependencies
- [ ] Step 3: Select template based on source type
- [ ] Step 4: Generate test file
- [ ] Step 5: Validate generated tests compile
Step 1: Locate source
| Input | Action |
|---|---|
| File path | Read directly |
| Class name | find api/src -name "*ClassName*.cs" -type f |
gaps |
Run scripts/find_coverage_gaps.py |
Step 2: Analyze source
Extract from each public method:
- Method signature (name, parameters, return type)
- Constructor dependencies → mock with
Substitute.For<T>() [Authorize]attributes → add 401/403 test cases- FluentValidation rules → add validation error tests
Step 3: Select template
| Source Pattern | Reference |
|---|---|
*AppService.cs |
See reference/appservice-tests.md |
*Validator.cs |
See reference/validator-tests.md |
*Controller.cs |
See reference/integration-tests.md |
Step 4: Generate and write
Output locations:
- Unit tests:
api/test/[Module].Application.Tests/[Class]Tests.cs - Integration tests:
api/test/[Module].HttpApi.Tests/[Class]IntegrationTests.cs
Step 5: Validate
dotnet build api/test/[Module].Application.Tests/
If build fails, fix compilation errors and rebuild.
Test Naming
Use pattern: [Method]_[Scenario]_[Expected]
| Example | Meaning |
|---|---|
Create_ValidInput_ReturnsDto |
Happy path |
Create_MissingName_ThrowsValidation |
Validation failure |
Get_NotFound_ThrowsException |
Entity not found |
Delete_Unauthorized_Returns403 |
Permission denied |
Установить generating-tests в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл generating-tests?
Generates xUnit tests for C#/.NET ABP Framework code using NSubstitute and Shouldly. Use when the user asks to generate tests, create test coverage, write unit tests, write integration tests, fill coverage gaps, or test a class or file. Supports AppServices, Validators, and HTTP API Controllers.
Как установить скилл generating-tests?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл generating-tests запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic