logoalt Hacker News

mangodrunktoday at 12:52 AM1 replyview on HN

Why substitute dependencies? Is the isolation worth it?


Replies

danparsonsontoday at 1:56 AM

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 :-)

show 1 reply