News

Customize Your Own Audio Test Cues in Visual Studio 2019 v16.9 Preview 3

Yes, developers can be alerted to a failed test with a fart sound.

As might be expected in a development iteration over the holidays that saw the end of a most challenging year, the new Visual Studio 2019 v16.9 Preview 3 is light on major new features or functionality. There are no game-changers here.

Except for this: Developers can now use any sound file they want to provide audio cues for test completions in Test Explorer.

That means developers can now hear the sound of children exclaiming "hooray!" for a successful test or -- according to an introductory video from Microsoft -- what sounds suspiciously like flatulence for a failed test.

Yes, developers can be alerted to a failed test with a fart sound.

"We had some fun with this, and hope you do too," Microsoft said of the new audio cues for Test Explorer, which was actually a user suggestion. While the feature can be fun, it also provides serious benefits for the visually impaired.

Visual Studio developers can choose from installed Windows 10 sounds (including Asterisk, Calendar Reminder, Test and so on), built-in Visual Studio sounds (like Build Failed or Breakpoint Hit) or they can upload their own sound files.

The Sounds Dialog and Test Explorer
[Click on image for larger view.] The Sounds Dialog and Test Explorer (source: Microsoft).

"The Test Explorer can now play a sound when a test run completes," Microsoft said in introducing the video. "You can select two sounds, one for indicating the test run succeeded with all passing tests and a second sound to indicate the test run completed with at least one failing test.

"This feature started as a user request and improves the accessibility of the Test Explorer by adding an audio cue which is useful for developers who have a visual impairment. The sound selection uses the default windows 10 sound dialog where you can also select from the preset sounds or any audio file from your computer!"

Of course developers across the world will immediately be downloading Preview 3 and fooling around with these sounds, so here is how to do it, straight from Microsoft documentation:

  1. Open the default Windows 10 sound dialog.
  2. Navigate to the Sounds tab.
  3. Find the Microsoft Visual Studio category. Choose the Test Run Succeeded or Test Run Failed sounds to select the preset sounds or browse to your own audio file.

However, for, uh, customized sounds, developers have to upload their own audio files. While Microsoft didn't explicitly explain how to do that (what file types are allowed, file location, etc.), they apparently would go in this directory: C:\Windows\Media. Although that's full of .wav files, Microsoft does say any audio file can be used.

Visual Studio 2019 v16.9 Preview 3 also includes relatively minor new features and tweaks affecting C++, IntelliSense, address sanitizer, high contrast improvement, .NET productivity, XAML tools (WPF, WinUI, UWP and Xamarin.Forms) and more. Anybody reading this who isn't right now scrambling to implement their own test cues can go here for that stuff.

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Compare New GitHub Copilot Free Plan for Visual Studio/VS Code to Paid Plans

    The free plan restricts the number of completions, chat requests and access to AI models, being suitable for occasional users and small projects.

  • Diving Deep into .NET MAUI

    Ever since someone figured out that fiddling bits results in source code, developers have sought one codebase for all types of apps on all platforms, with Microsoft's latest attempt to further that effort being .NET MAUI.

  • Copilot AI Boosts Abound in New VS Code v1.96

    Microsoft improved on its new "Copilot Edit" functionality in the latest release of Visual Studio Code, v1.96, its open-source based code editor that has become the most popular in the world according to many surveys.

  • AdaBoost Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the AdaBoost.R2 algorithm for regression problems (where the goal is to predict a single numeric value). The implementation follows the original source research paper closely, so you can use it as a guide for customization for specific scenarios.

  • Versioning and Documenting ASP.NET Core Services

    Building an API with ASP.NET Core is only half the job. If your API is going to live more than one release cycle, you're going to need to version it. If you have other people building clients for it, you're going to need to document it.

Subscribe on YouTube