|
|
|
|
|
by danparsonson
166 days ago
|
|
For the same reason you isolate variables in a scientific experiment; to ensure you're controlling the test that you're running, and not accidentally testing something else. To easily simulate failure cases, a range of possible inputs, bad data etc. To make the testing process faster when you have hundreds or thousands of tests, running on multiple builds simultaneously across an organisation. Off the top of my head :-) |
|
You can do all that without mocks as well.
Making the tests run faster at the expense of better tests seems counterproductive.
Now you should think of reasons why you should not isolate.