3 ms·
Testing against the real database? Won't keeping a copy of the database just for that be expensive? Also, should devs really be seeing potentially sensitive da
by xrisk 7y ago
Testing against the real database? Won't keeping a copy of the database just for that be expensive?
Also, should devs really be seeing potentially sensitive data?
On a side note, "I use SQL so I can change the backend language" is the hottest take I've heard in some time heh.
- dagss 7y agoWith database I meant an instance of whatever database engine you are using, not the actual data. My current project uses mssql. Each test run probably spins up and destroys 100 databases (inside one mssql docker container that is spun up for each test run). Each test function populates a DB from scratch (using the same sql migration scripts that we have used in prod), runs the test, drops the database. Can do that quite some times in the minute it takes to run the full suite. Point is to actually execute the SQL (or whatever NoSQL you use) as part of the test.