I am new to this group and the following questions might have been discussed before - however, i was unable to search the archives of this mailing list.

I am attempting to extend JUnit4. I have done a couple of things - i have extended RunListener and overridden some methods and i have extended TestClassRunner and created a custom runner to register my listener. My questions follow:

1. Is this the right way to hook into the events framework? After searching online and reading many articles, i tend to believe so. However, i would like to confirm.
2. I never get a callback to testRunStarted and testRunFinished. Even when i debugged through JUnit code, i do not see a code flow that calls these methods. Am i missing something? I would like some action to take place at the end of all the tests. How do i achieve this?
3. I use the internal method notifier.addListener(). Even though this works, i dont feel good using an internal method. Is there any other way to achieve this? Ditto while extending TestClassRunner. Any alternate ways will be helpful.

Looking for these answers using Google provided very little information.
Any help will be appreciated.