Loading ...
Sorry, an error occurred while loading the content.

Re: [junit] Logging start and end of tests & global rules

Expand Messages
  • Piergiuliano Bossi
    ... Yep, thanks, we ll give it a try. Giuliano -- Piergiuliano Bossi Blog: http://thinkingbox.wordpress.com/ Twitter: http://twitter.com/thinkingbox (English)
    Message 1 of 3 , Oct 1, 2011
    • 0 Attachment
      On Fri, Sep 30, 2011 at 7:14 PM, David Saff <david@...> wrote:

      > **
      >
      >
      > For this particular problem, you might want to consider:
      >
      > 1) Create your own subclass of RunListener that does the logging you
      > want. Call it MyRunListener
      >
      > 2) Create your own ClasspathSuite that overrides run like this:
      >
      > class MyClasspathSuite extends ClasspathSuite {
      > // ...
      >
      > @Override public void run(RunNotifier notifier) {
      > notifier.addListener(new MyRunListener());
      > super.run(notifier);
      > }
      > }
      >
      > There's not an off-the-shelf way to add rules to a bunch of tests, but
      > in this case, your use case is closer to listening than modification.
      >
      > Does that help?
      >

      Yep, thanks, we'll give it a try.
      Giuliano

      --
      Piergiuliano Bossi
      Blog: http://thinkingbox.wordpress.com/
      Twitter: http://twitter.com/thinkingbox (English)
      Twitter: http://twitter.com/scatolapensante (Italiano)


      [Non-text portions of this message have been removed]
    Your message has been successfully submitted and would be delivered to recipients shortly.