ch.sf.htt
Class HttestWrapper

java.lang.Object
  extended by ch.sf.htt.HttestWrapper

public class HttestWrapper
extends java.lang.Object

Base test case for httest tests. Typically you extend this class and then set scripts dir, working dir, enviroment and verbose in a setUp() method or for individual tests.


Field Summary
protected  java.lang.String file
           
 
Constructor Summary
HttestWrapper(java.lang.String file)
           
 
Method Summary
static java.util.Collection<java.lang.Object[]> collectHttestScript(java.util.Properties props)
          Collect all files below a folder like $basedir/src/test/httest
 Httest getHttest()
          Gets httest instance.
 ExecResult runScript(java.lang.String scriptFileName)
          Convenience method for running httest script.
 void setEnvironment(Environment environment)
          Convenience method for setting httest environment.
 void setUp()
           
 void setUp(java.util.Properties props)
           
 void setVerbose(boolean verbose)
          Convenience method for setting httest verbose.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

file

protected java.lang.String file
Constructor Detail

HttestWrapper

public HttestWrapper(java.lang.String file)
Method Detail

getHttest

public Httest getHttest()
Gets httest instance.

Returns:
instance

setUp

public void setUp()
           throws java.lang.Exception
Throws:
java.lang.Exception

setUp

public void setUp(java.util.Properties props)
           throws java.lang.Exception
Throws:
java.lang.Exception

runScript

public ExecResult runScript(java.lang.String scriptFileName)
                     throws java.io.IOException,
                            HttestFailedException
Convenience method for running httest script.

Parameters:
scriptFileName - httest script file name
Throws:
java.io.IOException
HttestFailedException

setEnvironment

public void setEnvironment(Environment environment)
Convenience method for setting httest environment.

Parameters:
environment - httest environment

setVerbose

public void setVerbose(boolean verbose)
Convenience method for setting httest verbose.

Parameters:
verbose - httest verbose

collectHttestScript

public static java.util.Collection<java.lang.Object[]> collectHttestScript(java.util.Properties props)
Collect all files below a folder like $basedir/src/test/httest

Parameters:
props - IN all parameters hold in properties
Returns:
all found httest scripts