Automatic unit testing

So you finally found out that unit testing is what you need to keep quality up right?

And than, when you thought you had full code coverage, the tools come haunt you and use mathematics to prove that your unit test suit can have an even higher code coverage!

How to get into the new action? Microsoft has launched a new version of Pex, an automatic white box testing tool.

I’ve been playing around with it and the tests that Pex generates simply make sure that it walks all possible code paths. This literally means that if you have a method that takes a few parameters and contain a few if-statments thus leading to different code paths, Pex organizes its input to make sure that all your code paths are hit!

It’s a great tool. It even provides hints to enhance your code by suggesting input-checks for your methods.

Try the latest version of Pex, and make sure you watch the clear introduction video Getting started with Pex.