10 DAYS AGO • 1 MIN READ

(#6) Integration tests 🧩 A bunch of puzzles to connect

profile

pills.dev 💊 weekly coding tips & tricks

Join +2,660 software developers getting weekly tips covering security, quality and system design.

Do you remember the pill about test doubles? I hope you do because they are important not only in unit tests.

Unit tests are cool.

But integration tests are cooler 😎 (...well, not cooler, but more abstract).

They help us to answer the questions about our system like:

  • Can we establish a connection to an HTTP endpoint?
  • Can we establish a connection to the database?
  • Can serialize/deserialize objects for transport?
  • Can we accept incoming requests?
  • Can we handle the exceptions and errors properly?

As you see in the picture below, we want to answer the questions above in isolation from the entire system. To achieve such isolation we need... test doubles! 😂

Another way of presenting a high-level view of the system might be the hexagonal architecture depicted below. Integration tests test... well... integration with other systems.

Quick email.

Quick tip.

Rate this email:

GREAT 😃 | OKEY 😐 | BAD 😟

All the best,
Bartosz

pills.dev 💊 weekly coding tips & tricks

Join +2,660 software developers getting weekly tips covering security, quality and system design.