Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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??

share|improve this question
    
If your tests take 15-20 minutes, perhaps you should delegate them to a CI-engine watching the source repository? –  user1249 Sep 21 '12 at 7:22
    
I am sure I saw this exact question before, just can find it now –  BЈовић Sep 21 '12 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 '12 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 '12 at 15:58
add comment

2 Answers

up vote 5 down vote accepted

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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