Monday, 9 September 2013

JUnit 3 and 4 not working on eclipse 4.2

JUnit 3 and 4 not working on eclipse 4.2

I am trying to learn JUnit and I am not able to make it run. I tried
eclipse 4.2 and Android Developer tools (v22). I am setting up a simple
project with one test case. I tried with JUnit 4 and 3, but whenever I run
the test case as a JUnit test, nothing happens, the console hangs. No
output from setup before class, tear down or any method. No results.
Here's a simple screenshot of the project with JUnit 3 (same thing happens
with JUnit 4).

I looked for solutions on the SO and other places but none of them seem to
fit my case. The most common problem is multiple JDKs, where in fact I
have a single JDK installed, namely 1.7. The second common problem is the
inclusion of JUnit libraries in the project. As you can see, the library
is in fact included. When I go to the run configuration to check the
classpath, I don't see JUnit, like in the following screenshot.

However, even if I add JUnit to the running classpath in the launch
configuration, I still have the same issue.
Is there anything I can do to fix it or see what could be the problem?

No comments:

Post a Comment