Fast by default
Exercise handlers in memory for feedback that stays tight, then switch to a real ephemeral server when the network is part of the behavior.
Dart server quality system / 01
A sharp, framework-agnostic testing toolkit for Dart HTTP backends — from the first in-memory assertion to a full browser journey.
serverTest('checkout returns an order',
(client, _) async {
final response = await client
.post('/checkout', body: payload);
response
.assertStatus(201)
.assertJsonPath('order.status', 'paid');
},
handler: handler,
);
same handler → memory / HTTP / browser
The toolkit
Every layer is designed to compose, so the test you write at the edge still feels like the code you own in production.
Exercise handlers in memory for feedback that stays tight, then switch to a real ephemeral server when the network is part of the behavior.
Read failures like a story. Status, headers, JSON paths, schemas, uploads, and numeric values all fit one fluent response API.
Move from an API check to a real WebDriver flow without changing how your handler is wired or where your test data lives.
Implement `RequestHandler` once. Reuse it in in-memory tests, HTTP tests, and browser sessions — framework-agnostic by design.
Schema validation and focused response assertions make contracts explicit before a regression finds them for you.
Install browsers, drivers, and test scaffolds from the CLI, then get back to testing the behavior that matters.
Start with one command
Add the core harness. Add the Shelf bridge only if your server speaks Shelf. Nothing else is required.
See the setup guide →dart pub add --dev server_testing
# For Shelf applications
dart pub add --dev server_testing_shelf
A clear path through the docs
Already on Shelf?
server_testing_shelf translates Shelf requests and responses into the same testing surface. Your app stays familiar; your tests get the full toolkit.