4 ms·
We did that with transactions. Every test gets their own view of the database, and rolls its changes back after they're done. They take much longer than unit te
by sedatk 6y ago
We did that with transactions. Every test gets their own view of the database, and rolls its changes back after they're done. They take much longer than unit tests but it's worth it in the end as writing unit tests are easy, there is no need to create mocks, and you also test if your DB queries work too this way.