Get started with Microsoft IntelliTest

Last Update: 11/22/2016

Visual Studio 2017 | Visual Studio 2015

Important attributes

using Microsoft.Pex.Framework;

[..., PexClass(typeof(Foo))]
public partial class FooTest {
    public void Bar([PexAssumeNotNull]Foo target, int i) {
[assembly: PexAssemblyUnderTest("MyAssembly")] // also instruments "MyAssembly"
[assembly: PexInstrumentAssembly("Lib")]

Important static helper classes

  • PexAssume evaluates assumptions (input filtering)
  • PexAssert evaluates assertions
  • PexChoose generates new choices (additional inputs)
  • PexObserve logs live values to the generated tests
void StaticHelpers(Foo target) {

    int i = PexChoose.Value<int>("i");
    string result = target.Bar(i);

    PexObserve.ValueForViewing<string>("result", result);

Got feedback?

Post your ideas and feature requests on UserVoice.

Tell us what you think with Send-a-Smile Send-a-Smile on the title bar.

Go back Back to the index