Test output in Eclipse: stdout or stderr?

330 views
Skip to first unread message

Adam Cameron

unread,
Oct 11, 2012, 12:35:04 PM10/11/12
to mxu...@googlegroups.com
G'day
I'm just trying to work out if this is a ColdFusion Builder bug, or a quirk of MXUnit.

I've got my Preferences > Run/Debug > Console > "Show when program writes to standard out" UNCHECKED.  This was the most likely setting I could find which would stop the console popping up when MXUnit runs its tests, and logs all the "Running method ... finished" output.  I understand why it's output, but I don't need to see it: the info on the MXUnit view is fine for that.

However when I first open a project and run some tests, the console still pops open. If I close it, it stays closed on subsequent runs. However if I close the project and reopen it, then it pops back again on first run.

Now my instinct is that it's a bug in CFB, because... well... CFB is flaky.  However I just thought I'd verify that you're not writing this stuff to stderr, in which case I would expect to see the console opening up.

I do not know how to determine what source the entries came from (or indeed if the console I'm looking at is a particular one for stdout or stderr.

Cheers for any guidance.

--
Adam

Marc Esher

unread,
Oct 11, 2012, 4:58:33 PM10/11/12
to mxu...@googlegroups.com
Adam,

The MXUnit Eclipse plugin doesn't write to standard out but instead attaches to Eclipse's console mechanism and writes directly to it. That's why that preference doesn't affect the behavior. 

That behavior of staying closed until you reopen it, or close/reopen a project, is kinda built-in to Eclipse... The plugin isn't doing anything fancy here.

Marc



--
Adam

--
You received this message because you are subscribed to the Google Groups "mxunit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/mxunit/-/jvV7akcIc6EJ.
To post to this group, send email to mxu...@googlegroups.com.
To unsubscribe from this group, send email to mxunit+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mxunit?hl=en.

Adam Cameron

unread,
Nov 23, 2012, 5:48:52 AM11/23/12
to mxu...@googlegroups.com
Hi Marc
Sorry, I forgot to subscribe to responses so didn't see you'd responded to this. Thanks!

I just noticed that the console actually DOESN'T reliably stay closed between re-runs of tests within the same project/session.  I just ran some tests, closed the console window, did some stuff, committed my changes (via Windows Explorer / TortoiseSVN, not via any mechanism internal to CFB), and re-ran the tests and the bloody console  popped open again.

It's just irritating rather than a problem, but I thought I'd let you know that mismatch between what you say below and what my experience is.

Can you tell me the rationale behind outputting the info to the dedicated MXUnit window *and* putting it in the console as well? Seems like unnecessary duplication to me (although I am only noticing it cos the window won't stay closed ;-). I'm sure there's a reason for it; I'm just not seeing it.

Would it be easy for me to jump into the plug-in code and hack this bit out?  I've got no idea how Eclipse plug-ins work, but I'm sure I would work it out if I knew the general approach, where to look... ;-)

Thanks for your feedback on this mate.

--
Adam

Adam Cameron

unread,
Nov 23, 2012, 5:51:25 AM11/23/12
to mxu...@googlegroups.com
Ah, it seems to be connected to whether the MXUnit view is closed / reopened.  Makes a kind of sense.

Marc Esher

unread,
Nov 26, 2012, 6:41:22 PM11/26/12
to mxu...@googlegroups.com
Adam,

I agree with you, and I've changed the behavior. It's now toggled via a preference, and is off by default. Information is still written to the console for those who want it... it's just that the window will not activate itself if you don't already have it up.

You can get the latest bits by updating the plugin.

Thanks.

Marc


--
You received this message because you are subscribed to the Google Groups "mxunit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/mxunit/-/pOzh-9Y1_w8J.

Adam Cameron

unread,
Nov 27, 2012, 10:40:03 AM11/27/12
to mxu...@googlegroups.com
That seems to have done the trick, Marc. Thanks!

--
Adam
Reply all
Reply to author
Forward
0 new messages