mohamedradwan.com - Nothing can beat experience
Post
Cancel

How to limit the Pex to not explorer every block in your application

MS Pex one of the greatest tool I found for automation of the generation of the unit testing, but when you Pex your application you don't want Pex exploration to run for every method called for the desired method, so you can use some attributes to define this option PexInstrumentAssemblyAttribute Specifies to instrument an assembly PexInstrumentTypeAttribute Specifies to instrument a type PexAssemblyUnderTestAttribute Binds a test project to a project

1
2
3
4
[assembly:PexAssemblyUnderTest("MyAssembly")]
[assembly:PexInstrumentAssembly("Lib")]
[assembly:PexInstrumentType(typeof(MyClass))]

Trending Tags