abp-testing

Consolidate ABP integration tests for services and repositories with SQLite in-memory databases.

1|Updated Mar 20, 2026
One-click install
npx skills add https://github.com/afonsoft/VideoChat --skill abp-testing-afonsoft
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: abp-testing
Source: https://github.com/afonsoft/VideoChat/tree/main/.agents/skills/abp-testing
Command: npx skills add https://github.com/afonsoft/VideoChat --skill abp-testing-afonsoft

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

ABP testing patterns unify approach to integration testing across application services, domain services, and repositories, elevating reliability over ad-hoc unit tests by promoting real-service execution, proper seeding, and deterministic outcomes.

Core Features & Use Cases

  • Adopt integration-first testing with GetRequiredService, IDataSeedContributor, Shouldly assertions, AddAlwaysAllowAuthorization, and NSubstitute mocking to validate ABP projects end-to-end.
  • Structure tests across *.Domain.Tests, *.Application.Tests, and *.EntityFrameworkCore.Tests to mirror the project layers.
  • Provide repeatable test data seeding and isolation to ensure consistent results across runs.

Quick Start

Run the ABP testing patterns guide in your test project to start integrating tests for application services, domain services, and repositories.

Frequently Asked Questions about abp-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write integration tests for ABP application services?

Integration tests for ABP application services validate real-service execution by resolving dependencies with GetRequiredService and wrapping operations in WithUnitOfWorkAsync. This approach runs against a realistic SQLite in-memory database with consistent data seeding for deterministic outcomes.

What is the best way to structure ABP test projects for domain and application layers?

The best way to structure ABP test projects is to mirror your architecture by creating separate *.Domain.Tests, *.Application.Tests, and *.EntityFrameworkCore.Tests projects. This isolates testing concerns and aligns test coverage with your specific ABP project layers.

Does ABP testing work with NSubstitute and Shouldly?

Yes, ABP testing works with NSubstitute and Shouldly. The patterns integrate NSubstitute for mocking external dependencies and Shouldly for assertions, while using AddAlwaysAllowAuthorization to bypass security checks during integration testing.

How do I seed test data for ABP integration tests?

You seed test data for ABP integration tests by implementing IDataSeedContributor. This provides repeatable test data seeding and isolation, ensuring your integration tests run against a consistent database state across every execution run.

Why use SQLite in-memory databases for ABP integration testing instead of unit tests?

SQLite in-memory databases elevate reliability over ad-hoc unit tests by promoting real-service execution. This ensures your ABP integration tests validate actual repository and domain service behavior with deterministic outcomes and proper data isolation.