#Halloween unit testing with Starcraft

#Halloween unit testing with Starcraft

So we have Halloween today. It's a day when people like to be scared. And for a dev there is nothing more scary than failed unit tests. Usually unit tests come into CI. But in case you are able run it on your system, here is a nice trick to enjoy unit tests on Halloween. It is also great if you want to be informed about progress of unit tests every day.

So the idea is to play sound when test starts, ends and fails. You can find variety of wav files to play them. Since i code part of my tests in C#, here is a short snipped to play a sound:

System.Media.SoundPlayer player = new System.Media.SoundPlayer(@"C:\fail.wav");
player.Play();
      player.Play();

Nothing fancy really. There will be plenty of similar codes for your flavour of language. Even you can play MP3 with some additional libraries most of the time.

So we have it. What is the next step? We need a sound pool. Since i am a big fan of Starcraft i found a very lovely website. Kinda cool to have all samples from SC:

I hope folks from Blizzard wont be angry. Just in case there are other free sounds on the internet.

Anyways....

For loading test i like Infested Terran sounds. For test load (For the Overmind!). When test completes (Ready to serve!) and I am Wretched for test fail.

There are loads more, for example if you don't like talks and want just pure Zerg sounds.

Cool. Isn't it? It is not only a good idea for Halloween.

It is also helpful when you want to run down some tests manually, and do something else in between. The proper "I am wretched" sound will let you know something broke in the app. And occasional "ready to serve" will remind tests are still ongoing.

And there it is. My humble Halloween gift to all #selenium, #unittest, #developer, #nunit folks out there. Have fun!

要查看或添加评论,请登录

Tom Smykowski的更多文章

社区洞察

其他会员也浏览了