Search code examples
unit-testingvisual-studio-2015intellitest

Are properties supported in Intellitest?


Run IntelliTest is disabled on properties, and Create IntelliTest does not create the PexMethod. enter image description here


Solution

  • Exploring property getters/setters is not supported. Please consider opening this as a 'feature request' on uservoice at either of the following links: https://visualstudio.uservoice.com/forums/121579-visual-studio-2015?query=IntelliTest - OR - https://visualstudio.uservoice.com/forums/330519-team-services?query=IntelliTest.

    [Added below information on 11 May 2016]

    If a method accesses properties then IntelliTest will explore the property as part of exploring the method itself. However, just before release, we did find some issues when launching the Run IntelliTest and/or Create IntelliTest commands directly on property accessors. So we decided to disable that until such time as we saw enough demand for it. However, as you have shown, it has not been disabled cleanly.

    We will disable it cleanly at the next opportunity that we get to release, and here will be the behaviour you can expect:

    • Disable launching Run IntelliTest and/or Create IntelliTest on property accessors.
    • When doing a Run IntelliTest and/or Create IntelliTest at the class/namespace level, skip the cases where the exploration would begin at the property accessor (similar to the above).