ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Marsili <rsilis...@yahoo.com>
Subject AntUnit: pass parameters to a xxx-test.xml?
Date Mon, 06 Nov 2006 10:21:52 GMT
Hi,
I'd like to use ant-unit in my test cases and wondered if there is a way
to pass parameters (as properties?) to an "xxx-test.xml".
I'd use it to import a file containing all the data needed by the test(s),
without having to locate it with a relative path like "../../../common.xml".

In my "build.xml" I'd have something like:
    <au:antunit>
      <fileset dir="test" includes="**/*-test.xml"/>
      <property name="commonfile" location="abs/path/to/common.xml"/>
      <au:plainlistener/>
    </au:antunit>

                                and I'd use it in "specific-test.xml":
<project xmlns:au="antlib:org.apache.ant.antunit">

  <import file="${commonfile}"/>

  <target name="test01">
    ... using properties (and targets?) defined in common.xml ...
  </target>
</project>

Thank you,
Stefano Marsili





---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message