A while back I was test infected. On a side project I was saving myself tons of time, making good progress, and writing high quality code. It was really exciting, I was really happy, and it is one of my favorite moments of working on side projects. Then I hit the UI portion of the project and BDD became harder. Not only was the UI code not driven by tests, I would have to make changes to my tested code to support the UI and then instead of updating the tests, I would ignore the test case or worse, comment out the existing tests to get things working.
Since then every side project I’ve ever started has gone through the same loop, but I’ve become more resigned to abandoning unit testing as soon as the rubber hits the UI. I want to do better. I’m going to recommit myself to BDD on my side projects. I’m going to make a concerted effort to fall of the band wagon when UI testing becomes hard. And if I happen to slip I’ll get back on right away. No more commenting out tests to make things compile. The only tests that will be removed are those that no longer test the system.