When explaining the benefits of automated testing to skeptical developers, the concept that seems to get the most traction is that tests are "features" written for the developers. It's creating a magic button that will tell them whether or not the code they've just written will result in them being woken up at 4 am to fix a live site issue.
My biggest barrier to automated testing is that 90% of my code is either interacting with a database or passing views / json to a web browser.
At the Controller level, it's kind of pointless to test that "return View("Index")" returns a view called Index. We already know that's going to work, but now we have the added overhead that if we ever change it to "return View("Home"), the test is going to complain.
And at the Database level, the part that's going to go wrong (the SQL / Entity Framework statements) is abstracted away by Mocks and Fakes. So... what am I supposed to do?
View all comments
Show parent comment
4
u/UsingYourWifi Apr 29 '14
When explaining the benefits of automated testing to skeptical developers, the concept that seems to get the most traction is that tests are "features" written for the developers. It's creating a magic button that will tell them whether or not the code they've just written will result in them being woken up at 4 am to fix a live site issue.