Test tools for .NET and cross-platform apps
There are a few new goodies added to your everyday test tools that I hope will improve your test inner loop! To familiarize yourself with these new features you can see them in action in the Visual Studio Tips and Tricks video on Testing or keep reading!
Show in Test Explorer
Easily jump from the editor to the test in the Test Explorer with the new Show in Test Explorer command (Ctrl+E,S). Show in Test Explorer is also available from the editor right-click menu, CodeLens test glyph, and the right-click in the Solution Explorer.
Play a sound when a test run completes!
The Test Explorer can now play a sound when a test run completes. You can select two sounds, one that indicates the test run succeeded with all passing tests and a second sound to indicate the test run completed with at least one failing test. These sounds are completely customizable using the Windows sound dialog!
Console.WriteLine in Test Explorer
Console.Writeline will now appear in the test detail pane. For xUnit, output that uses the ITestOutputHelper will appear. Standard output as well as standard error will be shown in this pane, so your test output is available where you need it.
Run and debug tests on Linux containers, WSL, or over SSH connections!
Visual Studio can make your cross-platform development easier than ever with remote testing! You can now run Linux tests from Visual Studio by connecting the Test Explorer to remote environments. These can be Linux containers, WSL, and even SSH connections! Check out the setup documentation to get started at https://aka.ms/remotetesting.
Normally I’d have to push to a CI run before getting feedback from Linux test or other operating systems, but now I can get it all in my inner dev loop, including debugging a test in a Linux container.
Test web apps with Playwright
Where can I learn more?
If you are interested in more on performance, how hot reload can apply to the Test Explorer, or more on running tests over SSH connections check out the longer demo from .NET Conf.
You can find more test tools documentation at http://aka.ms/visualstudiotest.
To get started with Remote Testing follow the instructions at https://aka.ms/remotetesting.
As always, we are incredibly thankful to the community who suggested many of these features, commented design suggestions, and upvoted them to the top of our backlog! This guidance is invaluable to creating tools that the community loves. Share what you’d like to see next in your test experience in the comments!
Thanking you all and wishing you well,