Software testing has different levels where every unit or component of a software/system is tested. It’s main aim is to evaluate the system’s compliance with the specified needs.
There are mainly four testing levels and each of these testing levels has different purpose. These testing level provide value to the software development lifecycle.
- Unit Testing or Component Testing
- Integration Testing
- System Testing
- Acceptance Testing
Unit Testing/Component Testing
Here, individual units/ components of a software are tested. The purpose is to validate that each unit of the software performs as designed. A unit is the smallest testable part of any software. It usually has one or a few inputs and usually a single output
- Method: It is performed by using the White Box Testing method.
- Time: Unit Testing is the first level of software testing and is performed prior to Integration Testing.
- Who: It is normally performed by software developers themselves or their peers.
Following are some of the techniques in terms of code coverage used in unit testing:
- Statement Coverage
- Decision Coverage
- Branch Coverage
- Condition Coverage
- Finite State Machine Coverage
Different forms of Unit Testing
- Buddy Testing/Pair Testing: Here two team members work on the same application on the same machine. One works with the systems (with keyboard and mouse) and another make notes and scenarios.
- Automation Unit Testing: Unit testing is performed within the programmers IDE and usually is an automated process. Many plug-ins exist to allow for unit testing from within an IDE. JUNIT is a good example of a framework that allows automated unit testing.
- Reduces Defects when changing the existing functionality.
- Reduces Cost by capturing defects in very early phase.
- Improves design and allows better refactoring of code.
- When integrated with build gives the quality of the build as well.
- It cannot catch every bug in an application.
- Not possible to evaluate every execution path in every software application using unit testing.
- Number of scenarios and test data are limited.
You may also like: How Can Software Testing and QA Transform Healthcare Industry?