Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running JUnit Test in Eclipse opens console panel

Tags:

junit

eclipse

I want to ask you a simple question regarding my development environment configuration for running tests. I'm using Eclipse Helios and Junit4 and I put all my tests in a separate source folder. When I run my tests (all, some or just one, it's the same) Eclipse automatically opens the console panel to show the logged information of the class that is being tested.

Is there a way to avoid this and to keep Eclipse on the JUnit view (or panel), thus avoiding the console panel becoming active as soon as I run my tests? I tried closing the console panel, but it's reopened when I run tests...

like image 460
themarcuz Avatar asked Aug 24 '11 09:08

themarcuz


People also ask

Why my JUnit is not showing in Eclipse?

If you right click in Project Explorer and choose New, you see a much shorter menu that doesn't include the Junit option. Needs to be done in Package Explorer view...

How do I run JUnit test outside of Eclipse?

Press Alt+Shift+X,T to run the test (or right-click, Run As > JUnit Test). If you want to rerun the same test method, just press Ctrl+F11.


2 Answers

On the top-right of the console panel in Eclipse there are several buttons. Two of the buttons control the "pop-up" behavior of the console. Make sure you deselect both the "Show console when standard out changes" and ""Show console when standard error changes" buttons.enter image description here

like image 65
THelper Avatar answered Oct 24 '22 13:10

THelper


Try Run -> Run Config -> Common -> cancel Allocate Console. Does it work for you?

like image 45
Clark Bao Avatar answered Oct 24 '22 13:10

Clark Bao