Sample usage
<target name="run_tests" depends="compile">
<echo message="running tests" />
<testng classpathref="classpath" haltOnfailure="true">
<xmlfileset file="${xml}" />
<sysproperty key="env" value="${env}"/>
<sysproperty key="driver" value="${driver}"/>
</testng>
</target>
@Test
@Parameters ({"env","driver"})
public void setUp(String env, String driver) {
System.out.println(env+" success "+driver);
}
Execution : ant run_tests -Denv=test -Ddriver=ff
No comments:
Post a Comment