For real. I have been using DI to only mock infra and external services while keeping the actual code unmocked, and using an in memory db (we use Dynamodb so that’s easy) for testing. I write tests only at the interface level, send data in, mock infra, external services, and then assert side effects. Found this to work very well for now, especially for Lambdas which we have quite a lot of.
Whenever we encounter a bug, we ensure that that case is captured in a unit test as well, but priority on integration tests.
For real. I have been using DI to only mock infra and external services while keeping the actual code unmocked, and using an in memory db (we use Dynamodb so that’s easy) for testing. I write tests only at the interface level, send data in, mock infra, external services, and then assert side effects. Found this to work very well for now, especially for Lambdas which we have quite a lot of.
Whenever we encounter a bug, we ensure that that case is captured in a unit test as well, but priority on integration tests.