Sitemap
Mjukvare Engineering

Follow this publication and delve into cutting-edge practices for crafting impeccable code and honing software development expertise. Boost your skills and stay ahead of the tech curve. Follow us now!

Member-only story

Favoring Integration Tests Over Unit Tests to Verify Correctness

4 min readFeb 24, 2024

--

I’ve been writing unit tests since I started coding professionally. There’s a certain “zen” to it. It forces you to think about what it’s like to be another developer that has to use your code.

Even if that “other developer” is your future self.

Whenever I write a unit test, I not only want to verify correctness, but I also try to assess the class’ ergonomics–the developer experience that the class provides. I think an increasingly important aspect of writing good code is to write code that is pleasant to work with.

However, verifying overall system correctness is a trait that unit tests don’t possess.

Writing unit tests is dirt cheap. They’re impressively fast to write, execute, and verify a desired outcome. However, they’re also cheap in another sense. Unit tests are rarely enough to catch actual bugs that are likely to happen in production.

🔔 Want more articles like this? Sign up here.

Seeing something work in isolation under very controlled conditions is entirely different from seeing it work in a bigger setup, with multiple collaborating objects, different use cases…

--

--

Mjukvare Engineering
Mjukvare Engineering

Published in Mjukvare Engineering

Follow this publication and delve into cutting-edge practices for crafting impeccable code and honing software development expertise. Boost your skills and stay ahead of the tech curve. Follow us now!

Nicklas Millard
Nicklas Millard

Written by Nicklas Millard

I mostly write to "future me" sharing what I learn and my opinion on software development practices. youtube.com/@nmillard | open for contracts in Jan 2026.

Responses (9)