@RunWith(KeywordTestSuite.class)
@KeywordTests({ "My Keyword-Driven Test" })
public class MyTestSuite {
}
<target name="runTests" depends="compile">
<mkdir dir="./reports"/>
<junit printsummary="true" showoutput="true" fork="true">
<classpath>
<fileset dir="${output}">
<include name="**/*.jar" />
</fileset>
<fileset dir="${buildlib}">
<include name="**/*.jar" />
</fileset>
<fileset dir="C:/Program Files (x86)/Silk/SilkTest/ng/KeywordDrivenTesting">
<include name="**/*.jar" />
</fileset>
</classpath>
<test name="MyTestSuite" todir="./reports"/>
</junit>
</target>
JUnit タスクの詳細については、『https://ant.apache.org/manual/Tasks/junit.html』を参照してください。
<formatter type="xml" />
<junitreport todir="./reports">
<fileset dir="./reports">
<include name="TEST-*.xml" />
</fileset>
<report format="noframes" todir="./report/html" />
</junitreport>
JUnitReport タスクの詳細については、『https://ant.apache.org/manual/Tasks/junitreport.html』を参照してください。
完全なターゲットは、次のようになります。<target name="runTests" depends="compile">
<mkdir dir="./reports"/>
<junit printsummary="true" showoutput="true" fork="true">
<classpath>
<fileset dir="${output}">
<include name="**/*.jar" />
</fileset>
<fileset dir="${buildlib}">
<include name="**/*.jar" />
</fileset>
<fileset dir="C:/Program Files (x86)/Silk/SilkTest/ng/KeywordDrivenTesting">
<include name="**/*.jar" />
</fileset>
</classpath>
<formatter type="xml" />
<test name="MyTestSuite" todir="./reports"/>
</junit>
<junitreport todir="./reports">
<fileset dir="./reports">
<include name="TEST-*.xml" />
</fileset>
<report format="noframes" todir="./report/html" />
</junitreport>
</target>