Thursday, October 07, 2010

 

Pex - Automated White Box Testing Tool for .NET

Haven't updated this blog in ages it seems. Its not that I haven't been working on interesting stuff all this time ... it's just that once you get out of your habit of keeping up with your blog, its hard to get back to it. I will try and be more regular and post all the cool and techy stuff I get to do, not to mention all the stuff I learn about on the web.

So first off is Pex (now called Pex and Moles) is a product of Microsoft Researchers Peli de Halleux and Nikolai Tillman. Pex is an automated white-box testing tool that will generate unit tests for your code with a pretty high code coverage. It uses symbolic execution to accomplish this. There's a significant body of research that has gone into automated test generation over the past decade or so, and concolic testing is one such area that has enjoyed a great deal of attention. Now, as a result, we can see the testing field evolving to incorporate these newly-developed techniques. You can read more about Pex here, or try it out for yourself at: pexforfun.com.

I took a course last fall (yes, it took me this long to blog about it!) where we had to use Pex on an open source project and present our results. It was an exercise in test generalization (using parameterized unit testing). We chose xUnit.net as our target program and employed Pex with Code Contracts on it. The result was a slight increase in code coverage (coverage was already pretty high), but we thought using class invariants and code contracts, in general, made the code more testable.

Labels: , ,


Comments:

Post a Comment



<< Home