I want to run a simple JUnit test with Jenkins, and first I want to try it in command prompt, if it works.
The JUnit.jar file is in C:\junit.jar
I have a dynamic web project, in which I have a "test" package in which I have a LoginTest class
package test;
import junit.framework.TestCase;
public class LoginTest extends TestCase {
@Test
public void testLogin() {
....
assertstuff...
}
}
I have a separate project with a TestSuite class :
package test;
import org.junit.extensions.cpsuite.ClasspathSuite;
import org.junit.runner.RunWith;
@RunWith(ClasspathSuite.class)
public class TestSuite {
}
Then I added my LoginTest class to the TestSuite build path.
If I run the TestSuite with JUnit within Eclipse it works, but I want to run it from cmd.
I tried the following in cmd :
java -cp C:\junit.jar;D:\Documents\eclipse\blablabla\project_path\bin test.TestSuite
but it's not working. Could you help me with this issue?