net.sourceforge.sqlunit.tools
Class TestDocsGenerator

java.lang.Object
  extended by net.sourceforge.sqlunit.tools.TestDocsGenerator

public class TestDocsGenerator
extends java.lang.Object

This class converts output XML files generated by SQLUnit using Canoo as the reporter to XHTML which can then be viewed in a browser. This class will recursively trace through all directories looking for SQLUnit XML files, open each file, and extract the test name information from each.

Version:
$Revision: 1.1 $
Author:
James Henderson

Constructor Summary
TestDocsGenerator(java.lang.String dirToExamine, java.lang.String outputDir)
          Constructor for GenerateTestInfo.
 
Method Summary
 void createTestInfoListing()
          Create a listing of all tests within each test case
 void getDirectoryContents(java.io.File dir)
          Obtain a collection of all the files within a specified directory and all sub-directories
 int getNumTestCases()
          Obtain the number of test cases
 java.lang.String getOutputDirectory()
          Obtain the output directory as a String.
 java.io.File getTestDirectory()
          Obtain the test directory as a java.io.File
static void main(java.lang.String[] args)
          Main entry point into application
 void makeOutputDirectory(java.lang.String outputDirectory)
          Makes the output directory if it does not already exist.
 void printFileCollection()
          Print the entire collection of files.
 void terminate()
          Perform cleanup functions up termination
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestDocsGenerator

public TestDocsGenerator(java.lang.String dirToExamine,
                         java.lang.String outputDir)
Constructor for GenerateTestInfo.

Parameters:
dirToExamine - the directory to examine
Method Detail

main

public static void main(java.lang.String[] args)
Main entry point into application

Parameters:
args - Command Line arguments; use arg[0] to provide absolute path to directory containing SQLUnit directories and files to be processed

createTestInfoListing

public void createTestInfoListing()
Create a listing of all tests within each test case


getDirectoryContents

public void getDirectoryContents(java.io.File dir)
Obtain a collection of all the files within a specified directory and all sub-directories

Parameters:
dir - The specified directroes to retrieve a file collection from

makeOutputDirectory

public void makeOutputDirectory(java.lang.String outputDirectory)
Makes the output directory if it does not already exist.

Parameters:
outputDirectory - the full path name to the output directory.

getTestDirectory

public java.io.File getTestDirectory()
Obtain the test directory as a java.io.File

Returns:
The test directory as a java.io.File

getOutputDirectory

public java.lang.String getOutputDirectory()
Obtain the output directory as a String.

Returns:
the output directory name.

getNumTestCases

public int getNumTestCases()
Obtain the number of test cases

Returns:
The number of test cases

printFileCollection

public void printFileCollection()
Print the entire collection of files.


terminate

public void terminate()
Perform cleanup functions up termination