Passing arguments to Junit classes from ant?

From: Roy Smith (roy_at_panix.com)
Date: 04/30/04


Date: Fri, 30 Apr 2004 11:02:00 -0400

I'm using Junit under ant. Some of my test cases need to read files
which contain test data. I don't mind imbedding the file names in the
test cases, but I'd like to have the name of the directory where the
data files are stored parameterized in the build.xml file.

What's the best was to pass information like that from build.xml down
into the test cases? I was sort of under the impression that ant
properties showed up as Java properties accessable via
System.getProperty(), but they don't seem to.



Relevant Pages

  • Re: Server-side tools survey
    ... IntelliJ IDEA is my IDE. ... Ant, and JUnit. ... I developed an abstract data source layer, ...
    (comp.lang.java.programmer)
  • Re: JUnit - HTML report?
    ... it appaered that make wasn't that dumb afterall. ... And now you've got XML parsing too... ... JUnit is not an apache project. ... Which makes them usable with Ant but unusable in general. ...
    (comp.lang.java.programmer)
  • Re: Server-side tools survey
    ... hansel 1.1 ... > I'm currently working with JBoss/Tomcat, PostgreSQL, NetBeans, Struts, ... > XDoclet, Ant, JUnit, JUnitEE...and a few things I've probably forgotten ...
    (comp.lang.java.programmer)
  • Re: Ant 1.6.1 released
    ... > I have a problem using 'Ant'. ... of type: junit. ... What am I missing? ...
    (comp.lang.java.softwaretools)
  • question related to junit fork
    ... I am doing junit testing using build.xml and ant. ... But in target1, there are two Java classes, secondTest.class can only be executed after firstTest.class. ... <sysproperty key="testfilesdir" ...
    (comp.lang.java.programmer)