visual-studio-2015intellitest

How to Tell IntelliTest which Project to Store Generated Tests In?


I have a sample project for which I wish to use IntelliTests. Though I've created a project to house the generated tests, IntelliTest seems to ignore it and create a new project with another testing framework and settings. Is there a way to tell IntelliTest which project to use?

Here are the steps I've taken:

In my project there is one class with a single method. I have first right clicked within the method and selected Create IntelliTest from the context menu. Then I've create a test project using these settings:

enter image description here

I've now right click within the method again, and selected Run IntelliTest from the context menu. After the tests have been generated, I select all of them, and click on the save icon. IntelliTest now wrongly creates an new project with VS tests. It complete ignores the previous project created as well as all the setting (see picture).


Solution

  • When you ran Create IntelliTest on your product code, you would have noticed a test project with a .cs file and a parameterized unit test within it (look for the method decorated with [PexMethod]. Do a “Run IntelliTest” on that method and IntelliTest will know to save the resultant tests into that project.

    In the workflow you describe, you do “Run IntelliTest” on product code again. That is treated as a fresh exploration.

    Please see here for some context: https://blogs.msdn.microsoft.com/visualstudioalm/2015/07/25/unit-test-generators-extensibility-hats-off-to-our-community/