A seemingly futile discussion on considering XP

The reasons offered by the people for not switching to XP I talk to are so thin that they are practically transparent but yet they can't see thru them. e.g. Some points from a discussion yesterday with another person at work.

Even with auto testing (example here was NUnit) there is a "thin layer" that is never exercised i.e. the user moving the mouse to a particular menu item and clicking it.
I then showed him a test right there which directly called the eventhandler (Tim H. -search "UserInterrogator"- has done one step better by directly firing the event) but somehow it didn't quench his need for an "end-user" testing the app. I questioned his existing testing approach of using manual testing and how it attacks the thin layer but my rhetoric didn't get thru. His very thought of considering NUnit shows that his current approach is not doing the job as well as he liked. The thin layer is always present - i.e. tests not considered by the developer.

He had a customer found defect where he had a grid control which displayed a wrong value even though it's data store had the right value. This special grid is said to have no method to get the displayed value. Additionally he said that querying the grid for the cell value is delegated to the data store and hence NUnit would say that the test had passed. The solution was to refresh the grid after the calculation had modified the data store. I felt this falls in the weird UI control dept.

Next on his list, was that he already had a very huge code-base for a product that is already deployed and he doesn't have the time to write tests. I replied that in this case retrofitting tests is very difficult and not advisable. So what you should do .. the next time you have to make a change for a new defect.
1. Understand the area of the defect.
2. Write tests for that area first. Make all of em green.
3. Write a test for the defect.
4. Make that pass
5. Run all the tests from step 2 again and make sure you haven't broken anything.
6. Do your "Victory jig" (You have one right ? awww...)

After all this discussion, I lost an hour of my day and the person was still not convinced although he kept iterating that he wanted a bunch of tests that he could run at any given moment but no time, too diff... this n that and I hate this proj sustenance, and so on and so forth.
My brain kept yelling 'There's no free lunch dude. You want non-manual self-running test-base. GO WRITE IT!' As usual I muffled the noises in my head 8)

[Update Jan 26, 2008]
Looking back at this.. I realize Mary Poppedieck puts it as clearly as possible in the Google tech talks video. Look in Stuff I bookmarked on the blog home page.

No comments:

Post a Comment