From Benjamin blog;
BOF001: James Newkirk on Integrating Unit Testing into the Software Development Lifecycle. James Newkirk lead a Birds of a Feather session on Test Driven Development. The room was packed to the rafters, showing that Unit Testing is starting to reach a critical mass. Here are my notes on the discussion from the session which covered how to write tests, how to use tests against legacy systems, how to test against the database and many other topics. Should we write test code against interfaces or something more abstract than the implementation?James mentioned that MbUnit is a tool that allows you to test against an interface. The question was whether you should create interfaces that enable tests to be written against them in case further implementations were created in future. James' attitude was that this might result in wasted work ('you aint gonna need it') since you may not need it, or may not need it now. Instead, abstract things out when you need them - don't create an interface just to test it. James also said that an interface is not a good example of the contract of what is being done - it is the name of the method with input and outputs, but does not reflect how the method reacts to the input. James writes tests that show the real interaction between someone that calls the code and what it produces.
BOF001: James Newkirk on Integrating Unit Testing into the Software Development Lifecycle.
Should we write test code against interfaces or something more abstract than the implementation?James mentioned that MbUnit is a tool that allows you to test against an interface. The question was whether you should create interfaces that enable tests to be written against them in case further implementations were created in future. James' attitude was that this might result in wasted work ('you aint gonna need it') since you may not need it, or may not need it now. Instead, abstract things out when you need them - don't create an interface just to test it.
James also said that an interface is not a good example of the contract of what is being done - it is the name of the method with input and outputs, but does not reflect how the method reacts to the input. James writes tests that show the real interaction between someone that calls the code and what it produces.
I must say I'm disapointed to have missed TechEd Amsterdam and this session (It's only a couple hour from Brussels). Aaaaargghhh!
Page rendered at Friday, August 29, 2008 12:06:36 AM UTC
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.