>Parameterized Unit Tests via Pex

>I came across this Microsoft Research via Peli’s Farm. This looks like a cool idea at first glance but as I think about it I’m not sure it’s a good thing. It definitely helps for parameter validation but I’m wondering if a tool like this may just give developers a false sense of security.

I should qualify that I’m nowhere near a TDD guru (although I _am_ working at it). But how would a tool like this actually be able to verify the desired functionality when the developer doesn’t really know what values the method will be called with when the test runs? On the other hand I do know that bugs come out when a method encounters values not anticipated by the developer. Maybe this tool has it’s place as a “catch-all” for when the developer has written a bunch of unit tests to cover all the cases that they can think of. They can then “add on” Pex to get that extra bit of coverage and ensure that their code is being exercised fully.

Advertisements