PEXing your way to better quality
OK. So my previous blog talked about some issue in PEX. What I realized is that I should have a small blog on what PEX is all about. Though I'm sure that a simple search (like this one here) would come up with a lot of relevant results I'll give it a shot. Well here goes.
PEX is a white-box unit-testing tool. It reads the user code to be tested and based on that generates parameterized unit tests: click here for more detailed info.
With PEX, instead of writing multiple tests with different inputs for the same method, we write a single unit test and make the inputs to the method as parameters to the test and the pex engine will generate multiple tests for you with various combinations of inputs.
This means that we spend less time writing unit-tests and more time fixing our code.
In addition to parameterized unit tests, PEX offers object mocking capabilities which help us isolate the code to be tested from external dependencies. This helps us streamline our unit tests and make them independent from external components or systems, consistent and quick to run.
PEX also fits in very well were we to follow the test driven development approach as explained here.
For more information on PEX you can visit the following links: http://research.microsoft.com/pex
Till my next post.