Writing E2E Tests for Axum & GraphQL
(estebanborai.com)
from erlend_sh@lemmy.world to rust@programming.dev on 06 Sep 2023 20:02 +0000
https://lemmy.world/post/4571396
from erlend_sh@lemmy.world to rust@programming.dev on 06 Sep 2023 20:02 +0000
https://lemmy.world/post/4571396
As your application grows in features you want to make sure different flows work as expected. For isolated pieces of logic it’s very practical to use the built-in approach for tests in
cargo
.In other cases you may encounter a more complex scenario, with different layers, from data input to database queries. You will expect a specific output given certain input.
The Project
Consider one of my very rencent projects Gabble, a chat solution you can host yourself.
Gabble has different layers of logic, every operation will be processed in each layer in the following order:
- GraphQL
- Services (Domain Logic)
- Database (PostgreSQL)
#rust