Question
I have already generated pex testing classes for a particular class. However I have changed this class due to refactoring and logic changes but I do not think that the current pex generated test class now cover everything.
How can i force pex to regenerate the individual test classes for a parent?
Solution
You can proceed as follows:
- Right-click on the Pex test class (assume it's called
MyClass_Test
) and select Pex/Delete Generated Tests In Class. This will remove any tests from theMyClass_Test.g.cs
file. - Right-click in the test class again and select Run Pex Explorations. The
MyClass_Test.g.cs
will then be populated with the generated tests.
(In theory you don't need step 1, but it allows you to verify the tests are removed before being regenerated).
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow