Unit testing involves verifying the correctness of the smallest testable parts of an application, such as individual programs, classes, objects, or methods. The goal is to define expected inputs and outputs before writing the code to ensure the implementation meets requirements.
Test-Driven Development (TDD) is a core agile practice where test cases are written before the functional code. The developer then writes the minimum amount of code necessary to pass the test, iterating until the requirement is fully met.