net.sourceforge.sqlunit.tools
Class TUITool

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

public class TUITool
extends java.lang.Object

The TUITool is a text based program that generates the SQLUnit test element by actually running the stored procedure against the database. To run it from the command line, make sure that your CLASSPATH contains all the JAR files needed by SQLUnit, then run the following command. java net.sourceforge.tuisqlunittool.TUITool [-Drcfile=rcfile] [-Dmode=offline] where : rcfile is a startup file containing some or all of the parameters needed to run a single test. Typically you would use this to specify the connection parameters for your database. However, it can also be used to specify a full single test and run it in offline mode. See the supplied sqlunittuirc.sample for an example. offline indicates that the tool must run in offline mode, ie it should not wait for a quit command from the user to terminate after processing a single test. Only a single test can be run at a time with this setup.

Version:
$Revision: 1.8 $
Author:
Sahib Singh Wadhwa (sahibwadhwa@hotmail.com)

Constructor Summary
TUITool()
          Builds an instance of the TUITool.
TUITool(java.lang.String rcfile)
          Builds an instance of the TUITool and populates it with the contents of the rcfile Java properties file.
 
Method Summary
static void main(java.lang.String[] argv)
          Runner for the tool.
 void run()
          Runs the TUI interface in an infinite loop, first prompting for initial database connection information, then accepting inputs to run each test in turn.
 void setOfflineMode(boolean isOffline)
          Sets the run mode of the tool to offline.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TUITool

public TUITool()
Builds an instance of the TUITool.


TUITool

public TUITool(java.lang.String rcfile)
        throws java.lang.Exception
Builds an instance of the TUITool and populates it with the contents of the rcfile Java properties file.

Parameters:
rcfile - the property file to load.
Throws:
java.lang.Exception - if there was a problem constructing.
Method Detail

main

public static void main(java.lang.String[] argv)
Runner for the tool. Gets the arguments off the command line, instantiates the appropriate instance of the tool and runs it.

Parameters:
argv - an array of command line arguments.

setOfflineMode

public final void setOfflineMode(boolean isOffline)
Sets the run mode of the tool to offline. The default mode is online or interactive.

Parameters:
isOffline - if true, tool will exhibit non-interactive behavior.

run

public final void run()
               throws java.lang.Exception
Runs the TUI interface in an infinite loop, first prompting for initial database connection information, then accepting inputs to run each test in turn.

Throws:
java.lang.Exception - if any was thrown by underlying code.