Future of Unit Testing and Economics

Euan Garden managed the PDC 2008 Panel Session on the Future of Unit Testing, and Andrew has made a short summary.

Unit Test => (Automated) Developers Tests

An interesting thought that come from listening to this panel is that there is a confusion about what unit tests are and I agree that we should really call it (Automated) Developers Tests. This is one of the cases where Microsoft got it right when they called their developer testing tool msTest and not msUnit. Even so, I will continue to call these unit tests, but my meaning is for all tests that developers need to do.

I also agree that many developers still have the concept of “I am a developer so I don’t need to test my code – that is something that the QA team should do”.

Two Futures…

Watching the panel it is obvious that there are two paths that are being considered. The first is that we should not use any tooling at all, and that the pain of doing unit tests will help us write better code – (if you have any pain – it means that you are writing bad code, if you keep on having pain perhaps you are not a good developer), while the other camp say that testing is boring/complex, lets make it easier with tooling

Developer Testing Economics

There is a lot of economic sense in making developers testing there code early on, the early you detect a bug the cheaper it is.

image

So even without creating a better designed software there is still great value in developers testing their code. The thing is that most developers are not willing to test their code, it is too painful/boring. The future is that more and more developers will unit test the code as it cuts the costs of developing software, and that unit testing will be an industry standard. But what is going to make these developers start testing their code?

The Future – Unit Testing will be industry standard

I follow the Rails mantras of Opinionated Software, and my opinion is that we have to make unit testing easier for the masses to follow. It is great to see that Microsoft is also investing in tooling (Pex and TDD in Visual Studio 2010. Other vendors have these tools already – Parasoft .TEST).

The biggest obstacle for developers to unit tests is the need to isolate the code under test. Software is complex, which makes testing it complex. Using the divide and conquer technique to reduce the complexity of the tested unit will render testing these units simple.

Mocking frameworks today are not the same tooling they used to be, they are now isolation tools and these isolation tools will keep developing and progress and help developers focus on simplifying the task of testing their code.

5 comments
  1. HALFDAY – December 29, 2012 7:28 pmHey Gunnar, The website looks great. Alot of new fancy futaeres that no doubt will confuse the hell out of me but what the heck, at least I’ll be able to read the team news. Good luck in Amhurst, I hope the guys get the sled dialed in just right for a positive start to the season. I’ll be sure to check for updates. Say hi to the team principals for me. GOOD LUCK!!!

Add Comment

Required fields are marked *. Your email address will not be published.