



Recent release of Visual Studio 2015 RC came out with name change of Smart Unit Tests – now they will be called IntelliTest.
In general, IntelliTest is a parameterized unit test – PUT. It is a generalization of a unit test which use parameters. A PUT makes statements about the code’s behaviour for an entire set of possible input values, instead of just a single exemplary input value.
IntelliTests are based on previous Microsoft research called ‘Pex’. It’s engine uses white-box code analyses in order to synthesize test inputs that will execute all code paths. Next the inputs are persisted as a collection of traditional unit tests. This guarantees high coverage. The persisted test suite is evolved as the tested code evolves.
void TestAdd(ArrayList list, object element)
{
PexAssume.IsNotNull(list);
list.Add(element);
PexAssert.IsTrue(list.Contains(element));
}
Limitations:
- Analyzes .NET applications but generates only C# code.
- Assumes that the tested code is deterministic.
- Doesn’t handle multithreaded applications.
- Doesn’t understand x86 instructions (P/Invoke calls).
- Constraint solver is limited – can’t reason precisely about floating point arithmetic.
You can find more in Build Better Software with Smart Unit Tests article.




With .net core solutions, the “Create Tests” submenu does not show up. Is it possible to create “Smart Unit Tests” in .net core solutions?