|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.runner.BaseTestRunner
qat.parser.junitparser.JUnitParser
This file loads a single QAT file, and will attempt to resolve all keywords in this qat file file by first including any .INC statements, and their parent statements etc, until all neccesary files have been included.
Field Summary |
Fields inherited from class junit.runner.BaseTestRunner |
SUITE_METHODNAME |
Constructor Summary | |
JUnitParser()
|
Method Summary | |
void |
addError(junit.framework.Test test,
java.lang.Throwable t)
|
void |
addFailure(junit.framework.Test test,
junit.framework.AssertionFailedError t)
|
junit.framework.TestResult |
doRun(junit.framework.Test test)
|
junit.framework.TestResult |
doRun(junit.framework.Test test,
boolean wait)
|
void |
endTest(junit.framework.Test test)
|
void |
finish()
This method indicates we are finished with this parser, and disposes any reserved resources. |
java.lang.String[] |
getIncludeList()
This should return the list of files other than standard java.util.Properties files which were included to parse this test file. |
java.lang.String[] |
getKeyWords()
This method should return all keywords associated with this test. |
java.util.Properties |
getProperties()
This method returns all the properties obtained by parsing this test file. |
java.lang.String[] |
getPropertiesIncludeList()
This should return the list of standard java.util.Properties files which were included to parse this test file. |
java.lang.String |
getProperty(java.lang.String name)
This method retrieves the specified property from the results of parsing this file. |
java.lang.String |
getProperty(java.lang.String name,
java.lang.String defaultValue)
This method retrieves the specified property from the results of parsing this file. |
java.lang.String[] |
getSyntaxKeyWords()
This method lists all the keywords supported by this syntax, for use in the Notepad syntax highlighting. |
java.lang.String |
getTestAuthor()
This method should return a test Author which will be used to display the test in the test tree. |
java.lang.String |
getTestBugInfo()
This method should return a test BugInfo which will be used for displaying the test in the test tree. |
java.lang.String |
getTestDescription()
This method should return a test Description which will be used to display the test in the test tree. |
java.lang.String |
getTestName()
This method should return a test name which will be used to display the test in the test tree. |
java.lang.String[] |
getTraceList()
This method should list all available output files produced by this test when run on the agent, but relative to the harness. |
boolean |
inEvaluationMode()
|
void |
interrupt()
This method is responsible for killing any processes already started on the agents, and immediately halt parsing any files. |
static void |
main(java.lang.String[] args)
|
java.io.PrintStream |
openPrintStream(java.lang.String fileName)
Returns a handle to the Printstream the parser will use for any output resulting from parsing this test. |
int |
parseFile()
This method parses the specified file. |
void |
prepare(java.lang.String projectResultsDir)
This is called at the beginning of a parser run on one or more tests. |
void |
printDebug(java.lang.String msg)
|
junit.framework.TestResult |
run(junit.framework.Test test)
|
void |
runFailed(java.lang.String msg)
|
void |
setEvaluationMode(boolean mode)
If set to true, the parser does not actually make contact with the agents but merely simulates the agent responses to allow standalone parsing. |
void |
setPrintStream(java.io.PrintStream printStream,
boolean useHtml)
This method sets the PrintStream to use for reporting errors and other types of output from the script. |
void |
setProjectRoot(java.lang.String projectRoot)
This method sets the path to root of the current project. |
void |
setProperties(java.util.Properties p)
This method sets any default properties which will be required for parsing this file. |
void |
setStatusLabel(javax.swing.JLabel status)
This is the handle to to QAT parent GUI to display which commands the parser is processing in real-time. |
void |
setTestPath(java.lang.String testPath)
This method sets the path to file file containing the syntax which will be parsed. |
void |
startTest(junit.framework.Test test)
|
void |
testEnded(java.lang.String msg)
|
void |
testFailed(int i,
junit.framework.Test test,
java.lang.Throwable t)
|
void |
testStarted(java.lang.String msg)
|
Methods inherited from class junit.runner.BaseTestRunner |
clearStatus, elapsedTimeAsString, extractClassName, getFilteredTrace, getFilteredTrace, getLoader, getPreference, getPreference, getPreferences, getTest, inVAJava, loadSuiteClass, processArguments, savePreferences, setLoading, setPreference, setPreferences, showStackRaw, truncate, useReloadingTestSuiteLoader |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JUnitParser()
Method Detail |
public void setProjectRoot(java.lang.String projectRoot)
setProjectRoot
in interface ParserInterface
public java.lang.String[] getSyntaxKeyWords()
getSyntaxKeyWords
in interface ParserInterface
public void setTestPath(java.lang.String testPath)
setTestPath
in interface ParserInterface
public void setPrintStream(java.io.PrintStream printStream, boolean useHtml)
setPrintStream
in interface ParserInterface
public void setProperties(java.util.Properties p)
setProperties
in interface ParserInterface
public java.util.Properties getProperties()
getProperties
in interface ParserInterface
public java.lang.String getProperty(java.lang.String name)
ParserInterface
getProperty
in interface ParserInterface
public java.lang.String getProperty(java.lang.String name, java.lang.String defaultValue)
ParserInterface
getProperty
in interface ParserInterface
public java.lang.String getTestName()
ParserInterface
getTestName
in interface ParserInterface
public java.lang.String getTestAuthor()
ParserInterface
getTestAuthor
in interface ParserInterface
public java.lang.String getTestDescription()
ParserInterface
getTestDescription
in interface ParserInterface
public java.lang.String getTestBugInfo()
ParserInterface
getTestBugInfo
in interface ParserInterface
public java.lang.String[] getKeyWords()
ParserInterface
getKeyWords
in interface ParserInterface
public java.lang.String[] getIncludeList()
getIncludeList
in interface ParserInterface
public java.lang.String[] getPropertiesIncludeList()
getPropertiesIncludeList
in interface ParserInterface
public java.lang.String[] getTraceList()
getTraceList
in interface ParserInterface
public void prepare(java.lang.String projectResultsDir)
prepare
in interface ParserInterface
projectResultsDir
- - the canonical pathname of
the project file, used to decide where to place
the parser trace files.public final void setEvaluationMode(boolean mode)
setEvaluationMode
in interface ParserInterface
public final boolean inEvaluationMode()
public int parseFile() throws java.lang.Exception
parseFile
in interface ParserInterface
java.lang.Exception
public void interrupt()
ParserInterface
interrupt
in interface ParserInterface
public java.io.PrintStream openPrintStream(java.lang.String fileName) throws java.io.FileNotFoundException
openPrintStream
in interface ParserInterface
java.io.FileNotFoundException
public void printDebug(java.lang.String msg)
printDebug
in interface ParserInterface
public void finish()
finish
in interface ParserInterface
public void setStatusLabel(javax.swing.JLabel status)
setStatusLabel
in interface ParserInterface
public void runFailed(java.lang.String msg)
public void testFailed(int i, junit.framework.Test test, java.lang.Throwable t)
public void testEnded(java.lang.String msg)
public void testStarted(java.lang.String msg)
public junit.framework.TestResult run(junit.framework.Test test)
public junit.framework.TestResult doRun(junit.framework.Test test)
public junit.framework.TestResult doRun(junit.framework.Test test, boolean wait)
public void startTest(junit.framework.Test test)
startTest
in interface junit.framework.TestListener
public void endTest(junit.framework.Test test)
endTest
in interface junit.framework.TestListener
public void addError(junit.framework.Test test, java.lang.Throwable t)
addError
in interface junit.framework.TestListener
public void addFailure(junit.framework.Test test, junit.framework.AssertionFailedError t)
addFailure
in interface junit.framework.TestListener
public static final void main(java.lang.String[] args)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |