How to play sound after running unit tests in Visual Studio

When I develop on my local machine, I want Visual Studio to play a happy sound when I run my unit tests and they pass, and a sad sound when it fails, and very sad when more than one fails. How to do it?

I suppose I need to write a macro, but I cannot find any environment events related to unit tests. I am using Visual Studio 2010, but it would be nice to have a common solution for most or all versions of Visual Studio.

+5
source share
2 answers

I am using a Visual Studio extension called "Ding". This will allow you to assign a sound: build complete, breakpoint, unit test - success and unit test - failure.

I use only unit test events with Ding. I have "build failed" and "build successed" events assigned using regular Windows events described above in @gerdi. Dean does not distinguish between 1 test and failure.

I really don't find the sounds annoying, since I have about 25 projects in my solution and more than 800 unit tests, so I have a little time to look at other tasks before the sound goes out, which is my idea for sounds. Of course, a short pause in power would not be excluded (LOL). And, yes, I work alone.

Additional Info About Ding

+1

, , , VS → → → = > Microsoft Visual studio ". , .

0

All Articles