# abp-testing

> Claude/Codex skill by [@abpframework](https://omgskills.com/library/abpframework/index.md) · 14k stars · Updated 2026-11-01

ABP testing patterns - integration tests over unit tests, GetRequiredService, IDataSeedContributor, Shouldly assertions, AddAlwaysAllowAuthorization, NSubstitute mocking, WithUnitOfWorkAsync. Use when writing or reviewing tests for application services, domain services, or repositories in ABP projects.

Tags: abp, angular, architecture, aspnet, aspnet-core, aspnetcore, blazor, c-sharp, csharp, domain-driven-design, dotnet-core, framework, modular-monolith, multi-tenancy, saas

## Install

```sh
git clone https://github.com/abpframework/abp /tmp/abp && ln -s /tmp/abp/.claude/skills/abp-testing ~/.claude/skills/abp-testing
```

## From README

ABP Testing Patterns Docs: https://abp.io/docs/latest/testing Test Project Structure | Project | Purpose | Base Class | |---------|---------|------------| | .Domain.Tests | Domain logic, entities, domain services | DomainTestBase | | .Application.Tests | Application services | ApplicationTestBase | | .EntityFrameworkCore.Tests | Repository implementations | EntityFrameworkCoreTestBase | Integration Test Approach ABP recommends integration tests over unit tests: Tests run with real services and database (SQLite in-memory) No mocking of internal services Each test gets a fresh database instance Application Service Test Domain Service Test Test Naming Convention Use descriptive names: Arrange-Act-Assert (AAA) Assertions with Shouldly ABP uses Shouldly library: Test Data Seeding Disabling Authorization in Tests Mocking External Services Use NSubstitute when needed: Testing with Specific User Testing Multi-Tenancy Best Practices Each test should be independent Don't share state between...

## Links

- HTML page: https://omgskills.com/library/abpframework/abp/dot-claude/skills/abp-testing/
- GitHub: https://github.com/abpframework/abp
- Author: [@abpframework](https://omgskills.com/library/abpframework/index.md)

## More from this repo

- [abp-angular](https://omgskills.com/library/abpframework/abp/dot-claude/skills/abp-angular/index.md) — ABP Angular UI patterns - generate-proxy, ListService, PermissionGuard, abpLocalization pipe, ConfirmationService,...
   - [@abpframework](https://omgskills.com/library/abpframework/index.md) · 14k stars
- [abp-app-nolayers](https://omgskills.com/library/abpframework/abp/dot-claude/skills/abp-app-nolayers/index.md) — ABP Single-Layer (No-Layers / nolayers) application template - single project structure, feature-based file...
   - [@abpframework](https://omgskills.com/library/abpframework/index.md) · 14k stars
- [abp-application-layer](https://omgskills.com/library/abpframework/abp/dot-claude/skills/abp-application-layer/index.md) — ABP Application Services, DTOs, CRUD service, object mapping (Mapperly/AutoMapper), validation, error handling.
   - [@abpframework](https://omgskills.com/library/abpframework/index.md) · 14k stars
