Unit and Integration Testing
Unit tests check a small piece of code in isolation. Integration tests check that real parts of a system, such as an application and its database, work together across a boundary.
itSoftware engineering | OpenSkills.info
Intro
Unit and Integration Testing
Automated tests give you evidence about behavior before a change reaches users. They do not prove that a system is correct. They make specific promises executable, repeatable, and visible in a build.
A unit test exercises a unit of work under your control without real infrastructure. The exact boundary varies by design, but the useful property is fast, local feedback. Keep databases, file systems, network calls, clocks, and remote services outside that boundary unless they are the thing you intend to test.
An integration test crosses a real boundary between components. It can prove that an application speaks to its database, serialization matches an HTTP contract, or a message reaches the next component. It is broader and usually costs more to set up and run.
This section is part of the paid course.
See pricing to subscribe, or log in if you already have access.
