我想知道使用ANT运行testng.xml中提到的java文件的过程。
我们是否必须先编译这些java文件然后再运行它?或者 testng ANT 任务负责编译和运行?我已经完成了 testng ANT 任务代码,但我不太明白。有人可以解释一下吗?
<taskdef resource="testngtasks" classpath="testng.jar" />
<testng classpathref="run.cp" outputDir="${testng.report.dir}" sourcedir="${test.src.dir}" haltOnfailure="true">
<xmlfileset dir="${test14.dir}" includes="testng.xml" />
</testng>
最佳答案
One of attributes classpath, classpathref or nested must be used for providing the tests classpath.
这意味着您必须在运行测试之前编译测试类。
关于java - 使用 ANT 运行 testng xml 中存在的 java 文件的过程是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30535725/