ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "P.S.Lokesh" <>
Subject junit tests in single jvm
Date Wed, 19 Apr 2006 06:48:56 GMT

I have been looking through the docs to run my junit tests in the same 
jvm where server is started, but i could not achieve it through parallel 

shown below is the sample code:

<target name="startserver" description="Starting Server">
              <exec dir="/producthome/bin" executable="/bin/sh" os="Linux">
*                <!-- I expect all the unit tests to happen in this jvm 
where start server starts a main java class -->*
                    <arg line=""/>
                  <sleep seconds="30"/>
                        <mkdir dir="${}/html"/>
*                <!-- But I thik this task starts a separate jvm and 
hence my results fails -->*
                         <junit printsummary="withOutAndErr" 
showoutput="true" forkmode="once">
                                <classpath path="${clp}"/>
                                <batchtest todir="${}">
                                        <fileset dir="${classes.dir}">
                              <formatter type="xml" />
      <echo message="Junit complete and starting junit report......... "/>
    <junitreport todir="${}">
      <fileset dir="${}">
        <include name="TEST-*.xml"/>
     <report todir="${}/html"/>

      <echo message="Junit report complete and stopping server......... "/>
      <exec dir="producthome/bin" executable="/bin/sh" os="Linux">
          <arg line=""/>

How do i achieve this ? Is there any other way to do this ?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message