▲ | s_ting765 6 days ago | ||||||||||||||||||||||||||||||||||||||||||||||||||||
Integration tests make unit tests absolutely redundant. | |||||||||||||||||||||||||||||||||||||||||||||||||||||
▲ | yakshaving_jgt 6 days ago | parent | next [-] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
No they don’t. If you’re, for example, writing a web application, and you have an endpoint which parses some data from the request and then responds with the result of that computation, why the hell would you test the fine-grained behaviour of your parser by emulating HTTP requests against your server? Testing the parsing function in isolation is orders of magnitude cheaper. | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
▲ | integralid 6 days ago | parent | prev [-] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
Integration tests are as old as unit tests, and both predate their names. When exactly were unit tests made redundant? I don't see the point of your quip without a trace of actual argument. I feel like I don't write enough tests, and when I do they're usually integration tests, but some things - algorithms, complex but pure functions, data structures - absolutely deserve their unit tests that can't be reasonably replaced by integration/e2e tests. | |||||||||||||||||||||||||||||||||||||||||||||||||||||
|