2 ms·
It sounds like you're writing functional or integration tests, not method-by-method unit tests. That's all easily accomplished with integration tests. Generall
by morgante 12y ago
It sounds like you're writing functional or integration tests, not method-by-method unit tests.
That's all easily accomplished with integration tests. Generally, any good architecture makes a separation between the UI and the backend. You should absolutely have integration tests for the backend by itself, but I don't think it is necessary to get to the level of unit tests (testing every single method used in the backend).
Personally, I try to separate the backend into its own separate service. The first step is to write tests against the API for that service, and then to make those tests pass by completing the service. This has the added benefit of letting the tests serve as a spec documentation, which makes it very easy to farm out implementation to employees or contractors.
- BugBrother 12y agoSorry, missed the answer. How can quick tests to see that API (and internal stuff) work not be Unit tests? :-) But sure, it is a discussion of what we should call the useful tests. I have (also) burned out on > 80% coverage for tests when the specifications aren't written in stone.