- Here are some points which, I think, can help you make good unit testing
- Unit test should be simple logically. One unit test should test one functionality only.
- Don't add the conditions in the unit testing.
- Don't have multiple assertations.
- Use the constant value in the assertation.
- Give each unit test a meaningful name.
- Whenever a bug is found add unit tests for it.
- Make the unit tests automatic and add the unit testing into the build scripts.
No comments:
Post a Comment