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


  • VS Code Now Has Apple Silicon Builds for Native Mac Development

    Goodbye Rosetta, hello M1. Visual Studio Code has been updated with new builds that let it run natively on machines with Apple Silicon (M1), the company's own ARM64 chips.

  • Visual Studio 2019 for Mac v8.9 Ships with .NET 6 Preview 1 Support

    During its Ignite 2021 online event for IT pros and developers this week, Microsoft shipped Visual Studio 2019 for Mac v8.9, arriving with out-of-the-box support for .NET 6 Preview 1, which the company also released recently.

  • Analyst: TypeScript Now Firmly in Top 10 Echelon (Ruby, Not So Much)

    RedMonk analyst Stephen O'Grady believes TypeScript has achieved the rare feat of firmly ensconcing itself into the top 10 echelon of his ranking, now questioning how high it might go.

  • Black White Wave IMage

    Neural Regression Using PyTorch: Training

    The goal of a regression problem is to predict a single numeric value, for example, predicting the annual revenue of a new restaurant based on variables such as menu prices, number of tables, location and so on.

Upcoming Events