Unit testing vs Integration testing

Unit testing is more or less like the tire testing. You take a wheel, disconnect it form the car, put it on the stand and run for a couple of hours. If you figured out the right parameters for the test (how long to run a wheel and how many pressure to apply) then you can be sure than it will work on the real car.

Integration testing or end-to-end testing is more like a neurologist hitting your knee with a hammer to test the reflexes or like the live test-drive of a new car. So you test an actual system without disconnecting the part.

When something terrible happens to your system, the unit tests helps you to exclude some parts that are working for sure. The integration tests on the other hand do not help much here but they reduce the chance of firing a bug in the most common use-cases.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.