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 for Converge360.

comments powered by Disqus

Featured

Upcoming Events