Apart from obvious unit tests and some mocks (no love for mocks, honestly speaking), there comes a point when you need to make sure that the end-to-end logic is correct in your application while it interacts with other services, the database, etc.<p>To be more specific, let's say there is a service that has a few endpoints with tricky behaviors.<p>For example, creating a resource might require:<p>* Making a call to service A
* Creating new records in table X
* Creating new records in table Y
...
* Making a call to service B<p>You get the idea. Even writing mocks for such cases is tiresome, not to mention that it might say nothing about the real interactions in the wild.<p>My current approach is using dockertest (I use Go for this project and Postgres), spinning PG in a Docker container and, well, testing each endpoint method completely.<p>Having said that, I would be interested in knowing how other people write such tests, how granular they are, what exactly is tested.<p>Probably, you can recommend some nice resources on integration testing you know of and find illuminating.