Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Then just use a database for unit testing as well.


Then you get a slow test suite. It's important to have a fast test suite to be able to do proper test driven development (which I still believe is the most efficient and effective way to write software, in general). Unit tests should be near 100% coverage. That means a lot of tests.


That's not always true — database-backed tests can be extremely fast, see https://github.com/peterldowns/pgtestdb.


databases can run hundreds of test in a ms. Sure without you could get to thousands in that ms - who cares.


Because then you wouldn't be doing unit testing; you'd be doing integration testing. You'd also probably not be testing the database in a realistic configuration and thereby missing the whole point.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: