使用 ANT 的 testng xml 中存在的 运行 java 文件的过程是什么

what is the process of the running the java files that are present in testng xml using ANT

我想知道 运行使用 ANT 处理 testng.xml 中提到的 java 文件的过程。

我们是否必须先编译那些 java 文件然后 运行 呢?或者 testng ANT 任务负责编译和 运行ning?我已经完成了 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>

根据testng doc

One of attributes classpath, classpathref or nested must be used for providing the tests classpath.

这意味着您必须在 运行 测试之前编译测试 类。