|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectqat.parser.qashparser.QASHParser
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. * * @author webhiker * @version 2.3, 17 June 1999 *
| Field Summary | |
static java.lang.String |
BUG_INFO
|
static java.lang.String |
INCLUDE_MISC_LIST
For internal use only. |
static java.lang.String |
INCLUDE_PROPERTIES_LIST
|
static java.lang.String |
INTERNAL_TRACE_LIST
|
static java.lang.String |
KEYWORD_TAG
|
static java.lang.String |
TEST_AUTHOR_TAG
|
static java.lang.String |
TEST_BUGINFO_TAG
|
static java.lang.String |
TEST_DESCRIPTION_TAG
|
static java.lang.String |
TEST_NAME_TAG
|
| Constructor Summary | |
QASHParser()
|
|
QASHParser(java.util.Properties p,
QASHProperties qashProperties,
java.lang.String testPath,
java.io.PrintStream printStream,
boolean evaluating)
This form of the parser is used for the commandline interface. |
|
| Method Summary | |
void |
finish()
This method is called after a parser run on one * or more QASH files. |
static int |
getClosingParenIndex(java.util.ArrayList expr,
int openingParenPos)
Returns the index of the closing parenthesis matching the opening parenthesis * passed in the parameter openingParenPos. |
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 key)
This method retrieves the specified property from the results of parsing this file. |
java.lang.String |
getProperty(java.lang.String key,
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 is the main loop for parsing the QASH file |
void |
prepare(java.lang.String newProjectResultsDirectory)
This method is called at the beginning of a parser run * on one or more QASH files. |
void |
printDebug(java.lang.String msg)
|
void |
removeProperty(QASHToken key)
|
void |
removeProperty(java.lang.String key)
|
void |
resetVariables()
|
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 |
setProperty(QASHToken key,
QASHToken value)
|
void |
setProperty(QASHToken key,
java.lang.String value)
|
void |
setProperty(java.lang.String key,
java.lang.String value)
|
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 testFileName)
This method sets the path to file file containing the syntax which will be parsed. |
void |
setupSyntax()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String KEYWORD_TAG
public static final java.lang.String TEST_NAME_TAG
public static final java.lang.String TEST_AUTHOR_TAG
public static final java.lang.String TEST_BUGINFO_TAG
public static final java.lang.String TEST_DESCRIPTION_TAG
public static final java.lang.String BUG_INFO
public static final java.lang.String INCLUDE_MISC_LIST
public static final java.lang.String INCLUDE_PROPERTIES_LIST
public static final java.lang.String INTERNAL_TRACE_LIST
| Constructor Detail |
public QASHParser()
public QASHParser(java.util.Properties p,
QASHProperties qashProperties,
java.lang.String testPath,
java.io.PrintStream printStream,
boolean evaluating)
| Method Detail |
public void setProjectRoot(java.lang.String projectRoot)
setProjectRoot in interface ParserInterfacepublic void prepare(java.lang.String newProjectResultsDirectory)
prepare in interface ParserInterfacepublic void finish()
finish in interface ParserInterfacepublic java.lang.String[] getSyntaxKeyWords()
ParserInterface
getSyntaxKeyWords in interface ParserInterfacepublic void resetVariables()
public void setTestPath(java.lang.String testFileName)
ParserInterface
setTestPath in interface ParserInterface
public java.io.PrintStream openPrintStream(java.lang.String fileName)
throws java.io.FileNotFoundException
ParserInterface
openPrintStream in interface ParserInterfacejava.io.FileNotFoundException
public final void setPrintStream(java.io.PrintStream printStream,
boolean useHtml)
ParserInterface
setPrintStream in interface ParserInterfacepublic void setProperties(java.util.Properties p)
ParserInterface
setProperties in interface ParserInterfacepublic final void setEvaluationMode(boolean mode)
ParserInterface
setEvaluationMode in interface ParserInterfacepublic final boolean inEvaluationMode()
public int parseFile()
throws java.lang.Exception
parseFile in interface ParserInterfacejava.lang.Exceptionpublic void interrupt()
ParserInterface
interrupt in interface ParserInterfacepublic void setupSyntax()
public java.lang.String getProperty(java.lang.String key)
ParserInterface
getProperty in interface ParserInterface
public java.lang.String getProperty(java.lang.String key,
java.lang.String defaultValue)
ParserInterface
getProperty in interface ParserInterfacepublic final java.util.Properties getProperties()
ParserInterface
getProperties in interface ParserInterface
public void setProperty(QASHToken key,
QASHToken value)
public void setProperty(QASHToken key,
java.lang.String value)
public void setProperty(java.lang.String key,
java.lang.String value)
public void removeProperty(QASHToken key)
public void removeProperty(java.lang.String key)
public void printDebug(java.lang.String msg)
printDebug in interface ParserInterface
public static int getClosingParenIndex(java.util.ArrayList expr,
int openingParenPos)
throws java.lang.Exception
java.lang.Exceptionpublic java.lang.String getTestName()
ParserInterface
getTestName in interface ParserInterfacepublic java.lang.String getTestAuthor()
ParserInterface
getTestAuthor in interface ParserInterfacepublic java.lang.String getTestBugInfo()
ParserInterface
getTestBugInfo in interface ParserInterfacepublic java.lang.String getTestDescription()
ParserInterface
getTestDescription in interface ParserInterfacepublic java.lang.String[] getKeyWords()
ParserInterface
getKeyWords in interface ParserInterfacepublic java.lang.String[] getIncludeList()
ParserInterface
getIncludeList in interface ParserInterfacepublic java.lang.String[] getPropertiesIncludeList()
ParserInterface
getPropertiesIncludeList in interface ParserInterfacepublic java.lang.String[] getTraceList()
ParserInterface
getTraceList in interface ParserInterfacepublic static final void main(java.lang.String[] args)
public void setStatusLabel(javax.swing.JLabel status)
ParserInterface
setStatusLabel in interface ParserInterface
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||