DEV Community

Discussion on: You Can Do it in SQL, Stop Writing Extra Code for it

Collapse
 
geshan profile image
Geshan Manandhar

If you put SQL in the db it might be hard to test but if it's in code it shouldn't be hard to test. Thanks!

Collapse
 
akashkava profile image
Akash Kava

Mocking is hard, creating unique instance of DB, seeding it, running 1000s of tests against it in parallel, all of that is hard, I never said it is impossible. It becomes terribly slow. I have created the tool to do it and we are doing it, but it is too slow compared to ORM's with in memory mocking.

Thread Thread
 
geshan profile image
Geshan Manandhar

Thinking of tesing with databae is hard, mocking it or at max using a in memory db is the better approach IMHO.