Hi all,
 
I am trying to write some EJB client test cases using Ant1.2 and JUnit 3.5. However, I am unable to get the 'new InitialContext()' call to work in the setUp() method of my test case. It is always telling me that it cannot find my initial context factory class. Under the 'ant -debug' mode, classpath for the JUnit task seems to be correct. The testcase runs ok outside of Ant. Is this a classloader problem? Here is my JUnit task:
 
    <target name="test" depends="ejb-jar">
   
        <junit printsummary="no" haltonfailure="no">
       
            <formatter type="plain"/>
       
            <classpath>
                <fileset dir="${external.jars}">
                    <include name="**/*.jar"/>
                </fileset>
                <pathelement path="${project.classes}"/>
            </classpath>
                  
            <!-- Batch Tests -->
            <batchtest fork="off">
                <fileset dir="${project.classes}">
                    <include name="**/*Test.class" />
                </fileset>
            </batchtest>
           
        </junit>
 
        <move todir="${project.testresults}">
            <fileset dir="${project.sources}" >
                <include name="TEST*.txt" />
            </fileset>
        </move>
       
    </target>
 
Thanks in advance.

Reply via email to