
Good Unit Tests
- One unit test should be independent (means its execution or variables should not be
dependent on any other unit test)
2. Code coverage of testing code should be above 80% (which is considered good)
3. Unit Test should as simple as there is no confusion of correctness of unit test code
4. Execution of unit test should be fast and generate accurate results
5. Should cover one code path (or condition) of a function (or method) at a time
6. Unit test name should be unique and show the function of that particle unit test
7. There should be a separate project of writing unit tests.
8. Parent classes should be tested first and then the child classes.
9. We should use mocks, for write unit tests of such functionalities which take longer time or
ambiguous.
10. Test Driven Development (TDD) should be followed while writing unit tests
11. Unit Tests project should be maintainable and well organized (in object oriented
perspective),



