Unit Testing Or Component Testing : Importance and Benefits

Unit Testing Or Component Testing : Importance and Benefits

In this article, we will learn what is Unit Testing and what is the importance of Unit Testing in any project.

What is Unit Testing??

Unit Testing also is known as a component, module or program Testing focuses on testing individual components that can be tested separately without having any dependency on any other component.

The main purpose of performing unit testing is that each individual components are working perfectly as designed. Unit testing is often done in isolation from the rest of the system, depending on the software development lifecycle model and the system, which may require mock objects, service virtualization, harnesses, stubs, and drivers. Unit testing may cover functionality (e.g., the correctness of calculations, error messages), non-functional characteristics (e.g., searching for memory leaks, performance or security issues), and structural properties (e.g., decision testing, orthogonal arrays).

Importance of Unit Testing

Ø Finding defects in the component
Ø Preventing defects from escaping to higher test levels
Ø Building confidence in the component’s quality
Ø Verifying whether the functional and non-functional behaviors of the component are as designed and specified
Ø Reducing overall risk

Now the obvious question that comes to our mind was on what basis or documents Unit testing could be performed:

Ø Code
Ø Design Document
Ø Data model
Ø Individual Component specifications

What kind of Issue Can be identified by Unit Testing??

A typical issue that can be identified in Unit Testing are:

ü Incorrect or unexpected system functionality.
ü Incorrect control and/or data flows within the system.
ü Failure of the component to work as described in individual component specifications.
ü Incorrect data flow or calculations.
ü Incorrect error messages.
ü Incorrect code logic



My Name is Ankur Jain and I am currently working as Automation Test Architect.I am ISTQB Certified Test Manager,Certified UI Path RPA Developer as well as Certified Scrum Master with total 12 years of working experience with lot of big banking clients around the globe.I love to Design Automation Testing Frameworks with Selenium,Appium,Protractor,Cucumber,Rest-Assured, Katalon Studio and currently exploring lot in Dev-OPS as well. I am currently staying in Mumbai, Maharashtra. Please Connect with me through Contact Us page of this website.

Previous Post
Next Post