|
Pex – Walkthrough
Pex enables a new development experience: Parameterized Test-Driven Development. In the following, we will develop and test a Chunker: A class which partitions a given string into pieces of a given size. Write a Parameterized Unit Test First
The following parameterized unit test states: When we concatenate all chunks, we get the original string.
Run Pex
Just right-click the parameterized unit test, and run Pex.
Consume Feedback
Pex reports generated test cases. Pex puts squigglies in the code indicating where generated tests failed. Pex suggests code snippets which will prevent the same failure from happening again.
Integrates with Unit Testing Frameworks
The generated tests integrate with VSTS.
High Code Coverage
The test cases generated by Pex give high code coverage, which can be visualized in Visual Studio.
|