3 ms·
And integration tests can also be fast
by lokar 3y ago
And integration tests can also be fast
- alemanek 3y agoTest containers really help with this. Should still have the big system tests that run overnight but a set of integration tests using Test Containers to stand in for the infrastructure dependencies is awesome. My team has a ton of those and they run inside a reasonable time frame (5min or so) but we still allow for excluding those from test runs so you can run just the unit tests.
- darkteflon 3y agoI hadn’t heard of Test Containers[1], but it looks really useful - thanks for the rec. [1] https://testcontainers.com/ https://testcontainers.com/
- berkes 3y agoIndeed! It's one of the reasons I like the adapter pattern (aka hexagonal architecture) so much. Data flowing through some 100 classes and 300 conditionals then into a `memory-payments` and back takes mere milliseconds. "Memory payments" is then some silly wrapper around a hashmap with the same API as the full-blown production payments-adapter that calls stripe over HTTP. Or the same api as the "production adapter" that wraps some RDBMS running on the other end of the data-center.