in the java test I have :
package Tester.GUI.api
public class Test1{-----}
in the “.bat” :
<path to java> -classpath<all jar defined in the classpath separated by ";"> org.junit.runner.JUnitCore Tester.GUI.api.Test1
when I launch th “.bat” I have the following :
JUnit version 4.6
Could not find class: Tester.GUI.api.Test1
Time: 0,203
OK (0 tests)
I have verified jar files , typo but not found the cause
someone could help please?
The
-classpathoption needs to take a set of directies and/or jar files. Currently those are missing, so your main class (JUnitCore) is being used as the classpath, andTest1used as the main class. I’m guessing you wantJUnitCoreas the main class andTest1as the argument.Try something like this (substituting the actual names of the jars you’re using for jar-file1, jar-file2):
Edit:
Assuming jar files are specified correctly, the error message indicates that the
Test1class isn’t on the classpath. If you’re using an IDE, you need to find the output directory for compilation (for example, in Eclipse it is<project>/binby default). Within this directory you will find other directories with the structureTester/GUI/api. A file calledTest1.classwill be in theapidirectory. It is this output directory that needs to be added to the classpath (that is, the one above theTester/GUI/apistructure).