NobbZ
Database mocking without requiring an *external* preconfigured database
For some python projects at work we found that there are pytest-{postgres,mysql,redis} and probably more.
These tools take the burden off of you to maintain a Dev database locally which you need to configure your in Dev applications accordingly.
Those are basically plugins for pytest, which use the fixture mechanism of pytest to provide temporary “installations” of the tool in question, “persisting” it’s data into temporary folders and removing after the suite has run.
Even though this has an obvious runtime cost to initialise the tooling for each test run, it really made onboarding the junior quite easy. We just told them to install mysql package for their Ubuntu WSL and told them to run make test which wrapped the actual test run with proper command line arguments. No need to walk them through configuring a local mysql or having remember to run some docker(-compose) whenever changing projects.
Has anyone seen something similar for elixir or is there any interest in it?
Most Liked
NobbZ
We used the MySQL version of those plugins, that basically starts a mysql demon with a configuration pointing the data dir to somewhere in tmp, listening on specified ports or domain sockets.
It manages the full database application lifecycle.
dallagi
If I understood your requirement correctly, you may be interested in excontainers, a library I developed to tackle exactly this problem.
Unfortunately it has not seen much adoption yet, but in case you decide to give it a try I’d be happy to hear about any problem you may encounter or any feedback you may have ![]()








