Loading lesson…
Level 1 · Apprentice0 XP
Fast tests for the core, a few slower ones for the adapters, very few end to end.
Step 1 / 5
ProblemEvery test starts Spring, a database and a browser. The suite takes 40 minutes, so developers stop running it. It is also flaky, so nobody trusts it.
← → step
Before this: CQRS: separate reads from writes
🛠️ Your turn
Reading is not the skill, doing is. Try for ten minutes before you open the hint. Getting stuck first is what makes the solution stick.
1.Write one contract test suite for a repository port, as an abstract class. Extend it twice: once with the in-memory fake, once with the real adapter on Testcontainers PostgreSQL.