Eclipse notification when all JUnit tests run

eclipse, java, junit

Solution

There isn't any kind of notification option built-in, but it would be pretty easy to write a plugin yourself to do it. See the documentation for TestRunListener.

Here's an example of something similar, although it will be tough to install it into an Eclipse instance since there is no update site provided.

Problem

Running my tests recently takes quite a time (about 1-2 minutes), and I usually get discracted by something while waiting for them to finish. Is there any way to make Eclipse give me a notification (e.g., playing a sound or something) when all of the tests are finished? I took a look on all possible settings in the run configuration of the JUnit runner, but haven't found anything I could use. Creating a test named `xxx.XLastTest` that does the job could be a workaround, but I find that a bit ugly (it won't work if the tests run concurrently, and I don't even want to see it in our CI). Any hints are greatly appreciated.

Original source