I always used to spend lot of time writing integration tests as running even a single test involves loading the complete application, which includes loading complete database every time. Then I realized that data which I use for testing is always the same, why can’t we restore the database once created, before we run the test so that at least time spent on loading data can be saved. Following is the script which I wrote and worked for me.
Read the full article