title: How to get junit report when testcase is executed from java class?
body: <p>I'm developping a keyword drivent testing framework.</p>
  
  <p>I'd like to get the html report of a junit testcase called within a java class.
  I'm able to get the html report when the testcase itself is call in a ant task : build, testcase_model, junit.</p>
  
  <p>But I'd like to have this ; build, DriveTest (the java class calling the testcase_model), junit. Unfortunately this doesn't generate a report.</p>
  
  <p>I call my testcase like this :</p>
  
  <pre><code>JUnitCore junit = new JUnitCore();
  junit.addListener(new TextListener(System.out));
  Result result=junit.run(TestCase_Model.class);
  </code></pre>
  
  <p>Thank you very much people.
  Jean</p>
  
  <p>/!\ UPDATE /!-------------------------------------------------</p>
  
  <p>Hello. For now I put aside the "@RunWith(SomeRunner.class)" way. In my DriveTest class I call my TestCase_Model like this : 
  <code>JUnitCore junit = new JUnitCore();
  RunListener listener = new RunListener();
  junit.addListener(listener);
  Result result = junit.run(TestCase_Model.class);</code>. </p>
  
  <p>My DriveTest target looks like this : 
  <code>&lt;target name="DriveTest (5)"&gt;
          &lt;mkdir dir="${junit.output.dir}" /&gt;
          &lt;junit fork="yes" printsummary="withOutAndErr"&gt;
              &lt;formatter type="xml" /&gt;
              &lt;test name="tech.DriveTest" todir="${junit.output.dir}" /&gt;
              &lt;classpath refid="RWD_Testing.classpath" /&gt;
          &lt;/junit&gt;
      &lt;/target&gt;</code>. </p>
  
  <p>I finally get the report but I just have a global result and not a detailled result (testRun1 -> success, testrun2 -> success). What seems wrong to you ?</p>