Introduction
Unit testing helps ensure that the code both fulfills the requirement, and future changes (even in other packages) do not cause a regression. The unit test is written as a separate package that references the package it is testing. If we follow Test Driven Development (TDD), we will write the tests early in the process (some would argue first). TDD changes the way we think when writing code. Should we need to make a change to a project, we are forced to update the test case code (as the tests will otherwise fail)--this promotes a test-centric approach to development, and naturally reduces the test cycles. Regression in other packages is caught by the build process; the build server will download all checked-in code, perform a ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access