What is unit testing?

Connor Brereton
2 min readMay 18, 2021

According to hackerdictionary.com a unit test is where individual components of a program are tested for their functionality. Each function is checked and run to make sure that it works properly rather than testing the entire application itself all at once.


Let’s dive a little deeper…

Unit testing is a software testing method in which specific software systems, such as groups of computer program modules, usage procedures, and operating procedures, are checked to see whether they are fit for use. It is a testing approach in which each individual module is checked by the developer to see whether there are any issues. It is linked to the individual modules’ functional correctness.

  • Unit testing is a form of software testing in which individual software components are evaluated.
  • During the creation of an application, unit testing of software products is performed.
  • A single component may be a single function or a single process. The developer is usually the one who performs unit testing.

Unit testing is the first phase of testing performed before integration testing in the SDLC or V Model. Unit testing is a form of testing that is typically carried out by developers. Since developers are hesitant to test, quality assurance engineers often perform unit testing.

What’s the point of unit testing after all..?

Unit testing has the following goals:

  1. To isolate a code segment.
  2. To ensure that the code is accurate.
  3. To put each function and procedure to the test.
  4. To save money by fixing bugs early in the development cycle.
  5. To aid developers in comprehending the code base and allowing them to make improvements quickly.
  6. To aid in code reuse.