0

I'm trying to run a simple JUnit test in Eclipse, but the preview pane with the very noticeable green/red bar will not show, instead it only shows the normal console window.

I checked that I run JUnit 4 in the run configuration.

import static org.junit.Assert.*; import org.junit.Test; public class TestF { @Test public void test() { AClass a = new AClass(); int t = a.Double(2); assertEquals(4, t); } } 

3 Answers 3

2

Try Window->Show view check there for JUnit. If it is not there then expand Window->Show view->Other and find there JUnit

Sign up to request clarification or add additional context in comments.

4 Comments

Tried and nothing happened. The preview still won't show
Then you probably have it minimalized on somewhere. Look around for smal green red JU icon. Most probably on the far right of eclipse window
Looked everywhere couldn't find it. If I switch to Java EE perspective it works. Odd.
You can try to customize perspective (Window->Customize perspective) and check fo JUnit entries there. Hard to tell why your GUI is not displaying something not even seen the screenshot ;)
1

Go to Window -> Perspective -> Reset Perspective... Then Window -> Show View -> Other -> search for JUnit and select it.

Comments

0

Open up Java EE, then Window->Show View --> JUnit...then switch back to Jave perspective and Window->Show View --> JUnit. you should now see the Junit window.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.