views:

13

answers:

0

hi,

i have written one ant script, that internally runs one java code. Below is the java code and ant script :-

<junit printsummary="yes">
 <formatter usefile="false" type="plain"/>
 <test name="com.junit.test.TestSuite"/>
 <classpath>
  <path refid="validator.classpath" />
  <path refid="lib.release.classpath" />
  <path refid="lib.ext.classpath" />
  <pathelement path="C:\JunitTest\config"/>
 </classpath>
</junit>

public void testSample() throws Exception {
 System.err.println("Test Case Working Properly");
 logger.fatal("HI this is also there");
 Thread.sleep(50000);
 logger.fatal("HI this is also there1");
 Thread.sleep(50000);
 logger.fatal("HI this is also there1");
 Thread.sleep(50000);
 logger.fatal("HI this is also there1");
}

The above code i am using to run test case TestSuite, but the problem i am facing is that i should get all the sysouts and loggers traces at console at runtume, instead i get all the output after the whole test class have completed, i mean i get the output at once.

And adding to above, i am not getting any sysout output on console, i am only getting the logger output, i am using logger "ConsoleAppender" mode.

am i missing something. Please help me.