Prerequisite – Types of Software Testing
Unit Testing is a software testing technique by means of which individual units of software i.e. group of computer program modules, usage procedures and operating procedures are tested to determine whether they are suitable for use or not. It is a testing method using which every independent modules are tested to determine if there are any issue by the developer himself. It is correlated with functional correctness of the independent modules.
Unit Testing is defined as a type of software testing where individual components of a software are tested.
Unit Testing of software product is carried out during the development of an application. An individual component may be either an individual function or a procedure. Unit Testing is typically performed by the developer.
In SDLC or V Model, Unit testing is first level of testing done before integration testing. Unit testing is such type of testing technique that is usually performed by the developers. Although due to reluctance of developers to tests, quality assurance engineers also do unit testing.
Objective of Unit Testing:
The objective of Unit Testing is:
- To isolate a section of code.
- To verify the correctness of code.
- To test every function and procedure.
- To fix bug early in development cycle and to save costs.
- To help the developers to understand the code base and enable them to make changes quickly.
- To help for code reuse.
Types of Unit Testing:
There are 2 type of Unit Testing: Manual, and Automated.
Workflow of Unit Testing:
Unit Testing Tools:
Here are some commonly used Unit Testing tools:
Advantages of Unit Testing:
- Unit Testing allows developers to learn what functionality is provided by a unit and how to use it to gain a basic understanding of the unit API.
- Unit testing allows the programmer to refine code and make sure the module works properly.
- Unit testing enables to test parts of the project without waiting for others to be completed.
- Difference between Unit Testing and Sandwich Testing
- Difference between Unit Testing and System Testing
- Difference between Unit Testing and Integration Testing
- Software Engineering | Differences between Sanity Testing and Smoke Testing
- Software Engineering | Comparison between Regression Testing and Re-Testing
- Sandwich Testing | Software Testing
- Alpha Testing | Software Testing
- Stress Testing | Software Testing
- Software Testing | Globalization Testing
- Software Testing | Stability Testing
- Software Testing | Load Testing
- Beta Testing | Software Testing
- Software Testing | Fuzz Testing
- Software Testing | Spike Testing
- Software Testing | Database Testing
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.