Pex is a testing tool developed by Microsoft Research. It
provides three very useful capabilities to support testing.
First, it can explore your code and suggest which tests you
should have. Second, if you have parameterized tests, Pex can
figure out which combination of parameters needs be tested in
order to give you full coverage of possible scenarios. And
finally, if you use Code Contracts, then Pex will employ that
information to fine-tune the unit tests it suggests or generates
for you. I'll review the three aspects in more detail after a
quick look at installation and set up. You can download Pex from
Microsoft. If you're curious about the underlying technology,
you can also access a few PDF documents explaining the internal
workings of the tool from the site. Pex is a standard add-in for
Visual Studio and should be installed like any other. Suggesting
Unit Tests Now let's look at what Pex can do. Suppose you are
not a TDD proponent; at some point, you may happen to have a C#
class and no unit tests for