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

Dupe the database. That's what I do in one of my test suites (though that's in part because the tests happen across 4 different processes so it's just not possible to keep it within one transaction).

Creating a db from a template is not free, but if there's not too much stuff in the db it's not horrendous either. And if you're using sqlite, you might be able to backup an on-disk template to an in-memory test db.



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

Search: