DEV Community

loading...

Discussion on: API end to end testing with Docker

Collapse
sonnk profile image
Nguyen Kim Son

In my previous company we also use a database dump for e2e test: the dump is imported into the postgres database before running the test. This way we make sure that the tests actually pass with regard to a real database. The dump is then updated from time to time on an adhoc basis.

Collapse
jpdelimat profile image
Jean-Paul Delimat Author

That is a good idea that brings your tests even closer to the production environment. Good point. I wonder how big the dump is though and how big the resulting containers were?

Collapse
sonnk profile image
Nguyen Kim Son

Actually our dump is from staging (we don't want to meddle with production data, imagine a test email arrives at customer inbox 😅) and the database is not that big, in my memory, it was less than 100MB. And as the dump data is only updated once in a while, it's built into the Dockerfile and not imported every time docker-compose is run.