2

I lose a ton of productivity by getting distracted while waiting for my tests to run.

Usually, I'll start to look at something while they're loading --- and 15-20 minutes later I realize my tests are long done, and I've spent 10 minutes reading online.

Make a small change... rerun tests ... another 10-15 minutes wasted!

How can I make my computer make some kind of alert (Sound or growl notification) when my tests finish, so I can snap back to what I was doing??

4
  • If your tests take 15-20 minutes, perhaps you should delegate them to a CI-engine watching the source repository?
    – user1249
    Sep 21, 2012 at 7:22
  • I am sure I saw this exact question before, just can find it now Sep 21, 2012 at 8:56
  • You couldn't just stick like, a puts "\a" in there as part of like, the final test to make your computer beep?
    – KChaloux
    Sep 21, 2012 at 14:16
  • Isn't this test framework/IDE/test runner technology specific? You could edit this to include which tech and then flag it to a moderator to migrate it to StackOverflow for you.
    – StuperUser
    Oct 17, 2012 at 15:58

2 Answers 2

5

While I haven't tried this, a quick Google search brought up growlnotify, which will send growl notifications from the command line.

From there, it's just something like this:

$ rake test ; growlnotify "done"

Your syntax may vary.

1
  • On my mac, in my .zshrc file I've created an alias: alias n='afplay -v 2 /System/Library/Sounds/Blow.aiff' now when I run a long task I write: rake test ; n Nov 26, 2014 at 18:34
0

You have.a good idea to a real issue, with the notifications, and @tylerl suggestion is good.

I would like to recommend a parallel approach: try as much as possible not to lose your focus (reading blogs, surfing around...) during the tests. During the (I assume, few) minutes that they take up, try not to "get distracted". Productivity is lost more on the context switching, pulling out of the mindset and getting back into it, than simply by the clock moving on.

It is not easy and it depends also on how and how long your test take.

I try, not always succeeding, to continue working, even simply thinking about the results and trying to anticipate and analyze them in my mind, or thinking about alternative solutions...

In this way you should (could?) Be able to remain productive while coding, and you can devote a more structured time to blogs, updating your skills, asking and answering questions here :) or relaxing in general.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.