Upgrade to MSTest V2!
MSTest V2 has crossed 1 Million downloads. Congratulations! Hats off to the community! MSTest V2 is seeing robust usage. We ourselves use it heavily. If you are still using an earlier version of the MSTest framework, we encourage you to upgrade.
We have looked at the uptake of MSTest V2 from the perspective of two constituencies, and our approach has been as follows:
(1) users creating new unit test projects: Starting with Visual Studio 2017, the in-box Unit Test Project templates use only MSTest V2. The older unit test project templates (that were using MSTest V1) are no longer available to the user. Thus newly created Unit Test projects automatically use MSTest V2.
(2) users opening existing unit test projects (that use an earlier version of the framework): Clearly such projects were created before Visual Studio 2017. For such projects, we are presently relying on messaging and communication – mainly via blogs – to drive awareness and manual upgrade. For example here are a few blogs on this site:
– Extending MSTest V2
– Visual Studio Test Platform, MSTest V2 – Transparent Development
– MSTest V2 is open source
– MSTest V2 – Now and Ahead
– Announcing MSTest V2 Framework support for .NET Core 1.0 RTM
– Taking the MSTest Framework forward with “MSTest V2”
If you have not read these already, please do.
Until now, we have intentionally stayed away from providing an automatic project upgrade experience.
That is because there are some projects like Coded UI Test Project and Web Performance and Load Test Project that rely MSTest V1. Their project templates still reference MSTest V1. But one can imagine guided experiences like – when a test project is opened, if that project has a reference to MSTest V1 and that project is neither of the aforementioned projects types, then pop up a dialog asking for user consent, and then upgrade the references to MSTest V2 – or a “retarget to MSTest V2” experience similar to what is available for retargeting the target/minimum platform for UWP applications – and so on. Similarly, on the command line, vstest.console.exe could be made to emit a diagnostic message informing the user about the availability of MSTest V2 with a link to documentation on how to upgrade.
Let us know your feedback regarding the need for any automatic/guided upgrade experience.
In the meantime, if you are still on an MSTest V1 based unit test project, upgrade to MSTest V2. It is trivially easy! And you have a million reasons now.