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
2
u/Stormflux Apr 30 '14 edited Apr 30 '14
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?