IntelliTest helps us to generates Unit Test automatically that give maximum of code coverage. In one of our previous post – Write Unit Test Automatically using IntelliTest in Visual Studio 2015 , we have learned about IntelliTest, how to use it and how it help to increase the code coverage with a very minimum effort. We have seen it, in a way of using “Run IntelliTest” command, which actually generate unit test for all methods within the specified class. In case you want to generate for any specific method or even start with a new one, you can use “Create IntelliTest” option.
They works in a exactly similar way how “Run IntellTest” works. the only difference it’s generate the unit test with test data for selected method. Also with Run IntelliTest, it first generate the test methods, shows them in Intellitest Windows, and then we can save them as project. Whereas, for Create IntelliTest, it creates the test project firsts and then we need to run the “Run IntelliTest” to execute the created test methods.
Must Read :
Write Unit Test Automatically using IntelliTest in Visual Studio 2015
How to write your very first Unit Test in Visual Studio using MSTest Framework easily ?
Select any of the test methods, Right Click –> “Create IntelliTest” .
This will bring the similar dialog window like “Create UnitTest” to enter initial project information
If you continue with default select values, and click Ok, Visual Studio would generate Test Project and add it to the solution . With “Run intelliTest” we need to save the the test results to create the projects
Now onward, everything would be same with what we have covered with Write Unit Test Automatically using IntelliTest in Visual Studio 2015 post.
You can also use other Unit Test Framework with IntelliTest. Install them as Visual Studio extension and then you should be able to select them from the “Test Framework” dropdown.
When Visual Studio creates the projects, it automatically takes care of assigning the reference assembly for the type of test framework selected.
For an example, following test project was create using IntelliTest and xUnit test framework.
Pingback: Visual Studio 2015 IntelliTest - The Daily Six Pack
Pingback: Dew Drop – August 6, 2015 (#2068) | Morning Dew
Pingback: Visual Studio – Developer Top Ten for August 14th, 2015 - Dmitry Lyalin