Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

WSAD 5/Ant/JUNIT problem  RSS feed

mike wasserman
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm want to use ant to run some JUNIT tests and generate reports for the tests.
I wrote the following build.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<project name="junitTest" default="test">
<target name="init">
<property name="outdir" value="."/>
<target name="test" depends="init">
<junit printsummary="true" >
<!--<formatter type="plain" usefile="false" />-->
<formatter type="xml" />
<test name="com.aon.frameworktest.ServiceLocatorTest" />
<pathelement location="${outdir}" />
<pathelement path="${java.class.path}"/>
<junitreport todir="./reports">
<fileset dir=".">
<include name="TEST-*.xml" />
<report format="frames" todir="./reports/html"/>
It runs, but the tests all throw the same error.
It seems that my tests can't find a properties file I use in my code. I am developing with WSAD 5.
The error is:
.\properties\ (The system cannot find the path specified) .\properties\ (The system cannot find the path specified)
I refrence the properties file in my code based on my working directory, which I set properly in my External Tools configuration.
Is there something I need to pass to the Test class inside of Ant to get it to find the properties file? This runs fine with I don't use Ant and just run JUNIT directly within WSAD.
Anyone have any ideas?
[ March 21, 2003: Message edited by: mike wasserman ]
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!