Pg_tmp – Run tests on an isolated, temporary PostgreSQL database
With the advent of easy to use docker containers, this is really easy to do for most backing services, right on your machine during tests (and in CI).<p>If all your app needs is rabbitmq (or some queue), redis, and postgres you can run all of them in the background and give out databases&#x2F;exchanges to your app as you see fit. This also does something interesting -- it turns you away from tools that don&#x27;t do badly in containerized environments or who are hard to set up, which is a benefit in my mind. It also turns you away from proprietary cloud solutions that you can&#x27;t run yourself (which isn&#x27;t always possible but meh).<p>I trust my E2E tests a lot more when they&#x27;re not built on mocking. I&#x27;m almost tempted to say that mocking is pointless in this world -- just test the real thing.<p>[EDIT] Since most people will know how to run redis&#x2F;postgres&#x2F;rabbitmq easily, one of the high value things is smtp testing. Here are a few projectsfor that:<p>- <a href="https:&#x2F;&#x2F;github.com&#x2F;sj26&#x2F;mailcatcher" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sj26&#x2F;mailcatcher</a> (<a href="https:&#x2F;&#x2F;mailcatcher.me" rel="nofollow">https:&#x2F;&#x2F;mailcatcher.me</a>)<p>- <a href="https:&#x2F;&#x2F;github.com&#x2F;mailhog&#x2F;MailHog" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;mailhog&#x2F;MailHog</a><p>- <a href="https:&#x2F;&#x2F;github.com&#x2F;maildev&#x2F;maildev" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;maildev&#x2F;maildev</a> (<a href="http:&#x2F;&#x2F;maildev.github.io&#x2F;maildev&#x2F;" rel="nofollow">http:&#x2F;&#x2F;maildev.github.io&#x2F;maildev&#x2F;</a>)<p>- <a href="https:&#x2F;&#x2F;github.com&#x2F;remko&#x2F;smtp-http-proxy" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;remko&#x2F;smtp-http-proxy</a> (this is more for turning SMTP into HTTP but it&#x27;s cool)<p>- <a href="https:&#x2F;&#x2F;github.com&#x2F;flashmob&#x2F;go-guerrilla" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;flashmob&#x2F;go-guerrilla</a><p>Remember, for a lot of these projects don&#x27;t be worried if you don&#x27;t see updates for years -- once you&#x27;ve written a reasonably working SMTP server, it may not need to change much.<p>I might take one of these and try to build a MailTrap[0] competitor eventually. $10&#x2F;month is twice the cost of a digital ocean droplet running one of these pieces of software (and I know that I can run the instances for even cheaper).<p>[0]: <a href="https:&#x2F;&#x2F;mailtrap.io&#x2F;pricing&#x2F;" rel="nofollow">https:&#x2F;&#x2F;mailtrap.io&#x2F;pricing&#x2F;</a>