Important note: These directions are for testing desktop unit test assemblies only. In particular, these directions will not work for .NET Core.
xunit.runner.visualstudioto at least one of your test projects.
Visual Studio Test.
Execution Options/Test Assembly, point to your generated test assemblies, e.g.
Execution Options/Code Coverage Enabledcheckbox.
Advanced Execution Options/Other console options.
After a successful build, the test results are available on the main view of the build. It should look something like this:
You no longer need to manually configure the test adapter path, because Nuget restored test adapters are automatically searched for.
Sometimes you get this error one or many times
Warning: System.AppDomainUnloadedException: Attempted to access an unloaded AppDomain. This can happen if the test(s) started a thread but did not stop it. Make sure that all the threads started by the test(s) are stopped before completion.
It is not related to VSTS and does not affect the results. For more information, see xUnit Issue 490 and MS Connect.