Tools & Languages
track recorded at TechDays 2009 Belgium

Pex – Automated White Box Testing for .NET

Session level: 300 Speaker: Peli de Halleux

Do you practice unit testing but always forget corner cases? Do you own a large (untested) legacy codebase? You might be interested by Pex, an automated white box testing tool for .NET. Pex is available for commercial evaluation through Devlabs. Pex systematically tries to cover every reachable branch in a program by monitoring execution traces, and using a constraint solver to produce new test cases with different behavior. Pex can be applied to any existing .NET assembly without any pre-existing test suite. Pex will try to find counterexamples for all assertion statements in the code. Pex can be guided by hand-written parameterized unit tests, which are API usage scenarios with assertions. The result of the analysis is a test suite which can be persisted as unit tests in source code. The generated unit tests integrate with Visual Studio Team Test as well as other test frameworks. By construction, Pex produces small unit test suites with high code and assertion coverage, and reported failures always come with a test case that reproduces the issue. In this session, we will show coding demos on how to apply Pex on any given piece of code to generate a regression suite and how to write parameterized unit tests that guide the Pex exploration.

BICT DataNews It Professional PC Magazine Smart Business