You could create a junit
ant task during your build and let Jenkins run that task
Here are some lines we used on a project. Here launching a suite called AllNonGWTTestCaseTests
<target name="runTests" description="Run JUnit tests">
<junit printsummary="yes" dir="test-classes" fork="true">
<classpath>
<pathelement location="inst-classes" />
</classpath>
<test name="xxx.AllNonGWTTestCaseTests" haltonfailure="no" outfile="result">
<formatter type="xml" />
</test>
</junit>
</target>
Building this will create the file result.xml. That configures an ant task.
Jenkins can launch this ant task. Take a look at your project configuration. Section Build > Ant task
. Then in Post-build Actions
just set the path to the xml file : result.xml
This should make Jenkins run the test suite as a post build action.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…