Chapter 10: Tests

Integration test

A test where several real pieces work together: your code against a real database, or two of your services talking to each other. It is slower, and it finds the bugs that live in the joins.

Agents write confident code against an interface they have guessed at. A real query against a real database settles the guess at once, which no unit test can do.

Say it to your agent

“Add an integration test for createOrder that uses a real in-memory SQLite database, runs the migrations, and checks the rows afterwards. Don't mock the database.”

The workshop

Name a word, or describe what you mean in everyday language.