|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.jameleon.ExecuteTestCase
public class ExecuteTestCase
Executes a Jameleon Test Case.
Field Summary | |
---|---|
protected Map |
contextVars
A set of key-value variables to be set in the context |
protected static String |
DASH
A line of dashes |
protected boolean |
debug
Print out stack trace of each failed Jameleon Test Case to stdout. |
protected List |
files
A list of files to execute |
protected org.apache.log4j.Logger |
log
|
protected boolean |
printFooter
Print the name of the script being executed to stdout |
protected static TestCaseTagLibrary |
tagLibrary
|
static String |
TEST_CASE_LISTENERS
The jameleon.conf configuration name for a list of desired TestCaseListeners to be registered. |
protected List |
testCaseListeners
A list of files to execute |
protected static String |
US
A line of underscores |
protected long |
waitTimeBetweenScripts
The # of milliseconds to wait between each script execution |
Constructor Summary | |
---|---|
ExecuteTestCase()
|
|
ExecuteTestCase(boolean debug)
|
Method Summary | |
---|---|
void |
addFile(File f)
Adds a file or directory to the list of files to be executed by this instance. |
void |
beginTestRun()
Begins the test run. |
static void |
closeAllLogs()
This is a workaround to the fact the shutdown is not called in log4j. |
protected void |
delay()
|
void |
deregisterEventListeners()
Remove all TestCaseListeners registered via the registerEventListeners method. |
void |
endTestRun()
Ends the test run. |
String |
execute(File f)
Runs through all files in the given file or directory and executes each file as a Jameleon test script. |
String |
executeFiles()
|
String |
executeJellyScript(File file)
Executes the given file as a Jameleon test script and returns the error message if the test failed. |
Map |
getContextVars()
|
List |
getFiles()
|
ResultsReporter |
getResultsReporter()
|
long |
getWaitTimeBetweenScripts()
|
static void |
main(String[] args)
|
void |
registerEventListener(TestCaseListener tcListener)
Register a new TestCaseListener in the TestCaseEventHandler. |
void |
registerEventListeners()
Read in desired TestCaseListeners defined in jameleon.conf and register them in the TestCaseEventHandler. |
void |
registerEventListeners(boolean useCurrentThread)
Read in desired TestCaseListeners defined in jameleon.conf and register them in the TestCaseEventHandler. |
JellyContext |
runScript(File file)
|
protected void |
setContextVariables(JellyContext context)
|
void |
setPrintFooter(boolean printFooter)
|
void |
setWaitTimeBetweenScripts(long waitTimeBetweenScripts)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final List files
protected final List testCaseListeners
protected Map contextVars
protected boolean debug
protected boolean printFooter
protected long waitTimeBetweenScripts
protected static final String DASH
protected static final String US
protected final org.apache.log4j.Logger log
protected static final TestCaseTagLibrary tagLibrary
public static final String TEST_CASE_LISTENERS
Constructor Detail |
---|
public ExecuteTestCase()
public ExecuteTestCase(boolean debug)
Method Detail |
---|
public void registerEventListeners()
public ResultsReporter getResultsReporter()
public void registerEventListeners(boolean useCurrentThread)
useCurrentThread
- if set to true, then use the current thread's classloaderpublic void registerEventListener(TestCaseListener tcListener)
tcListener
- The TestCaseListener to registerpublic void deregisterEventListeners()
public void setPrintFooter(boolean printFooter)
public void setWaitTimeBetweenScripts(long waitTimeBetweenScripts)
public long getWaitTimeBetweenScripts()
public void beginTestRun()
public void endTestRun()
public static void main(String[] args)
public static void closeAllLogs()
public String execute(File f)
f
- The file to execute
public String executeFiles()
public String executeJellyScript(File file)
file
- - the file to execute.
public JellyContext runScript(File file) throws JellyException, FileNotFoundException
JellyException
FileNotFoundException
protected void setContextVariables(JellyContext context)
public void addFile(File f)
f
- The file to addpublic List getFiles()
public Map getContextVars()
protected void delay()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |