- Always add unit test for new business logic code, and always add/refactor unit tests for refactored business logic code.
- Unit test code must be evaluated with the same level of quality as business logic code.
- Any implicit unit test behavior, should be written explictily.
- Make it easy to write new unit tests.
- Make it easy to refactor existing unit tests.
- Limit behavior of injected dependencies for any-and-all methods under tests. Do not overmock your mocks. Restrict the behavior of non-mocked dependencies to only expose required functionality.
- All unit tests must run in a reasonable amount of time.
- Unit test code must not be sent to production, without its corresponding business logic code. Business logic code must not be sent to production, without its corresponding unit test code.
-
Notifications
You must be signed in to change notification settings - Fork 1
NguyenAndrew/Unit-Testing-Guidelines
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Unit Testing Guidelines that apply for any and all programming languages
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published