What problem does it solve?
It solves the problem of writing reliable integration-style tests for Serverpod endpoints and business logic without manually wiring server context like DB, caching, authentication, and streams.
Core Features & Use Cases
- Server-backed endpoint testing: Call generated endpoints inside tests usingServerpod so requests run with realistic server lifecycle and validations.
- Session building for auth scenarios: Use sessionBuilder.copyWith to test authenticated vs unauthenticated behavior deterministically.
- DB seeding and safe rollback: Seed data in setUp blocks and rely on transaction rollback (or configure afterAll/disabled when concurrency requires it).
- Stream testing utilities: Verify real-time stream behavior using flushEventQueue to ensure yields are executed before asserting.
- Business-logic testing with Session: Test non-endpoint logic by creating and passing a Session directly.
Quick Start
Use the serverpod-testing skill to run your tests by calling withServerpod and invoking generated endpoint test tools from test_tools.