How to find out JUnit version in Eclipse

In eclipse:

  • Window β†’ Settings
  • Expand Java on the left side of the panel -> JUnit is under Java

How to find out JUnit version in eclipse?

+6
source share
5 answers

You can use this code:

import junit.runner.Version; System.out.println("JUnit version is: " + Version.id()); 
+11
source

If you chose JUnit4 over JUnit3, then the version that Eclipse uses is the one used in eclipse / plugins / org.junit_XXXX. For Eclipse Luna, this is eclipse / plugins / org.junit_4.11.0.v201303080030. Please note: if you want to change it based on all the things I tried, you can replace junit.jar contained inside with the version you need.

+3
source

Go to project properties -> java build path -> in the library tab, you will see junit jar. see the version on it.

+1
source

what ever junit jar you could load into the build path in eclipse , there will be a version of junit .

0
source
 version of junit.jar will tell u the version of your JUNIT in eclipse. I think it may be hidden in that jar 
0
source

All Articles