- Don’t aim at unit testing each method in the SUT. Unit test only the publicly available API.
- When writing unit tests, mimic the behavior of the SUT’s clients.
- Don’t test private methods. Either unit test them indirectly, using the public API, or extract them into separate classes and test those classes instead.
- Don’t hesitate to unit test internal classes as long as you follow the guidelines above
- Test data should kept and read from a file instead of string variable
Wednesday, May 30, 2018
Junit best practice
Subscribe to:
Post Comments (Atom)
5 Strategies for Getting More Work Done in Less Time
Summary. You’ve got more to do than could possibly get done with your current work style. You’ve prioritized. You’ve planned. You’ve dele...
-
Imagine going to work everyday and facing a colleague who does not respect you or having to work with someone who was constantly underminin...
-
Sometimes just to get a quick success build you might need to disable/ignore/skip some of the munit test cases. you can do you by double ...
-
Install ActiveMQ Step 1: Download Apache Active MQ 5.x.x (5.15.8 Latest Version Up to Feb 2019) Step 2: Install ActiveMQ Run the Active...
No comments:
Post a Comment