- Each unit is tested separate before integrating them in to modules.
- This give the ability to verify that the system functions work as expected.
- The goal of unit testing is to isolate each part of the programmer and show that individual parts are correct in terms of requirements and functionality.
- unit tests are basically written and executed by software developers.
- White box texting method is used for executing the unit test.
Advantages of unit testing
- Issues are found at early stage,the issues can be found very early and can be resolved then and there without impacting the other piece of codes.
- Unit testing helps in maintaining and changing the code. chances of impact of changes to any other code gets reduced.
- Since the bugs are found early in unit testing hence it also helps in reducing the cost of bug fixes.
- Unit testing helps in simplifying the debugging process.
- J Unit is a framework that I use for writing both unit and integration tests. it is the most popular testing framework for Java programming language
- Mockito is the most popular mocking framework for writing unit tests.
- Db Unit is a JUnit extension that can be used to initialize the database into a known state before each integration test and ensure that the database contains the correct data
No comments:
Post a Comment