How do I pass parameters to a Junit test from Ant? How do I pass parameters to a Junit test from Ant? selenium selenium

How do I pass parameters to a Junit test from Ant?


The junit task accepts nested sysproperty elements.

<junit fork="no">  <sysproperty key="mydatadir" value="${whatever}"/>  ...</junit>

You can access these from within your tests using System.getProperty().