-
Notifications
You must be signed in to change notification settings - Fork 246
Testing
Question: "Is endpoint works properly with external systems"?
Description: Such tests should be written only for user endpoints. No mocks, stabs can be used. We should keep E2E tests close to production environment. For E2E testing we can use own fully functional private network.
Location: separate package 'e2e'.
Question: "Are this components works together"?
Description: Component level tests. We should use it in case if there is no possibility for unit testing. Mocks and stabs can be used, such as net/http/httptest.Server mock. It's important to keep integration tests fast, reliable and predictable.
Location: separate package 'integration'.
Question: "Is this method works correctly"?
Description: Function or method level tests. Should be as small as possible and do test of method in isolation of all the system. Mocks and stabs can be used.
Location: same level and package name as the tested code.
Project Information
Getting started
Developers
Support
Internal