您可以
junit在构建过程中创建一个ant任务,然后让Jenkins运行该任务
这是我们在项目中使用的一些行。在这里推出了一个名为
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>
构建此文件将创建文件result.xml。这就配置了一个ant任务。詹金斯可以启动这个蚂蚁任务。查看您的项目配置。章节
Build > Anttask。然后,
Post-build Actions只需将路径设置为xml文件:result.xml
这应该使Jenkins作为构建后的 *** 作来运行测试套件。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)