title: Creating a Java reporting project -- would like to use JUnit and Ant but not sure how
body: <p>I'm interested in generating reports for a certain group of (non-software) engineers in my company using JUnit. Unlike typical JUnit testing where you are ensuring objects, methods, etc are bug free, I want to use JUnit to confirm if results in large log files are within range and give reports on it.</p>
  
  <p>My background: Experienced with Java. I am familiar with JUnit 4, I have spent the last hour or 2 looking through ANT documentation and I think I have a strong idea how it works (I just don't know all the XML commands), and I use Eclipse religiously. Specifically Eclipse June (latest).</p>
  
  <p>My goal is to create a slew of testcases that assert if the values in the logs are within the right range. The test class can then be run over and over on every single log file. After each run, the results will be added to an HTML file.</p>
  
  <p>I am aware of the JUnit Report features in Ant but I am having a lot of trouble putting all the pieces of the puzzle together properly. I know I can hack my way through this project quite easily, but I want to do this the right way.</p>
  
  <p>Can any point me in the right direction in how to:</p>
  
  <ul>
  <li>Make the right build.xml files</li>
  <li>Set up JUnit classes/suites/runners so that it runs over and over for a given list of logs</li>
  <li>Set up ANT so it does output HTML/XML and how to point it to the right style-sheet so it can be opened in IE/Firefox</li>
  <li>How to make the output file </li>
  <li>Override features so the reports are custom.</li>
  <li>What to override for post-processing. (So I can convert the output HTML into a PDF, etc)</li>
  <li>How to create a standalone executable that will do all this automatically - Perhaps incorporating a little Swing if the user doesn't supply an input manually. </li>
  <li>How to properly loop through many tests (currently I am just making a main function and doing: </li>
  </ul>
  
  <p>code:</p>
  
  <pre><code>public static void main(String[] args) {
      JUnitCore junit = new JUnitCore();
      RunListener listener = new RunListener();
      junit.addListener(listener);
      Result result = junit.run(GearAndBrakeFaultLogReports.class);
      for (Failure f : result.getFailures()) {
          System.out.println(f.toString());
          System.out.println(f.getDescription());
          System.out.println(f.getTestHeader());
          System.out.println(f.getException());
          System.out.println(f.getMessage());
      }
      System.out.println("Done.");
  }
  </code></pre>
  
  <ul>
  <li>I have a feeling that is the "hacky" way of doing it and if I knew how to plug into Ant properly, it will run  my tests, generate the XML/HTML and I would have the output desired.</li>
  </ul>
  
  <p>I imagine I will have more questions as this project develops, but I think getting over the initial hump will be very good for me! I  know there are a lot of questions, so any help and I'll gladly point bump :) My hope is, someone familiar with these tools can answer all these with a matter of pointing me to web sites, functions, or an example project that does a similar thing.</p>