|
|
|
|
|
by CHY872
3974 days ago
|
|
This is way simplistic. Frequently testing with the real database wastes a tonne of time. I've worked with a team where running a single test with the true database took a minute, and there were 200 such tests. Thankfully, the only guarantee they needed was that provided by a key-value store, so a ConcurrentHashMap was used on dev machines. Then the true database was used by the CI server, and commits only occurred when all of the tests passed with the true db. All of the OP's reasons would (in many cases) pale in comparison to 'My tests take hours to run'. |
|
We have a slow, unoptimized test suite (it does some really stupid things) which hits the database in most test cases and it still manages to complete 6166 tests in 4 minutes on my laptop (this includes setting up and tearing down the database).