You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Adrian Herscu <bm...@fastmail.fm> on 2006/03/10 01:54:48 UTC
[ant-testutil] setUp() an ANT test case
Hi all,
I am following the ANT tutorials, and now I am trying to see how I can
run tests under Maven.
I have put the HelloWorld and HelloWorldTest classes into a package
(let's say mypck). The test build file is also found in that package. So
when compiled the file system looks like this:
basedir
+-target
+-classes
+-mypck
HelloWorld.class
+-test-classes
+-mypck
HelloWorldTest.class
test-helloworld.build.xml
Now, if I am calling configureProject() with just the test build file
name then ANT tries to retrieve it from basedir (which results in a
FileNotFoundException).
I am trying to solve this without hardcoding the full pathname in the
HelloWorldTest::setUp method by calling:
getResource("test-helloworld.build.xml").getFile()
which returns an absolute path to the test build file.
The problem is that the BuildFileTest::configureProject does not know
how to handle absolute pathnames and a FileNotFoundExecption is thrown.
Any idea how to solve that?
Adrian.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org