java - Run JUnit tests automatically in Jenkins without maven or ant -
i setting continuous integration tool jenkins. run junit tests everytime build made. problem none of projects tested use maven or ant. know if possible run these tests without maven or ant, , if is, how do ?
thank in advance answers
have tried classpathsuite johannes link?
from documentation:
the mechanism simple. create new project in eclipse , add projects contain tests want run build path. create class that:
import org.junit.extensions.cpsuite.classpathsuite; import org.junit.runner.runwith; @runwith(classpathsuite.class) public class mysuite {}
this execute junit4 testclasses (those containing methods @test annotation) in projects classpath.
you can run using junitcore.
java -cp /usr/share/java/junit.jar org.junit.runner.junitcore [test class name]
for more information, see how run junit testcases command line?.
Comments
Post a Comment