Re: A way to get print to console in RunListener?

"Oleskandr" <[email protected]>
Newsgroups gmane.comp.java.junit.user
Message-ID <[email protected]>
--- In [email protected], Esko Luontola <esko.luontola@...> wrote:
>
> Oleskandr wrote on 22.2.2013 15:06:
> > JUnit internally call System.setOut
> > ...
> > I worry only about the right way to do output in RunListener. Is my
> > solution ideologically right or there are exist object for printing
> > message to console in JUnit API?
> 
> I don't think that JUnit itself calls it. It's probably the IDE or build 
> tool that calls it. They do it in order to accurately know that what 
> test printed what text. Some other IDEs read the process' stdout/stderr, 
> but that causes some inaccuracies in showing the results, as explained 
> in http://www.youtube.com/watch?v=Ggi6yutRZ9Y
> 
> Actually, because JUnit does NOT handle System.out/err itself, I set out 
> to write the Jumi test runner, to get better usability through a more 
> end-to-end coverage of the problem of running tests.
> 
Hm... So System.setOut() performed by Maven Surefire plugin...

Your video on youtube is interesting (where System.out and System.err print independently because IDE supplied OutStreams for 'out' and 'err' not synced).

So JUnit don't in play in this case. Thanks!



------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/junit/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/junit/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.