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.
Don’t stop now and take your learning to the next level. Learn all the important concepts of Data Structures and Algorithms with the help of the most trusted course: DSA Self Paced. Become industry ready at a student-friendly price.
- Difference between Unit Testing and Integration Testing
- Difference between Unit Testing and System Testing
- Difference between Unit Testing and Sandwich Testing
- Software Engineering | Differences between Sanity Testing and Smoke Testing
- Software Engineering | Comparison between Regression Testing and Re-Testing
- Difference between Software Testing and Embedded Testing
- Object Oriented Testing in Software Testing
- Performance Testing | Software Testing
- Software Testing | Non-functional Testing
- Software Testing | Load Testing
- Software Testing | Dynamic Testing
- Software Testing | Accessibility Testing
- Various Path Testing in Software Testing
- Smoke Testing | Software Testing
- Alpha Testing | Software Testing
- Software Testing | Mutation Testing
- Sandwich Testing | Software Testing
- Software Testing | Database Testing
- Software Testing | Spike Testing
- Software Testing | Endurance 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 firstname.lastname@example.org. 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.