qat.parser
Interface ParserInterface

All Known Implementing Classes:
JUnitParser, QASHParser, QAXMLParser

public interface ParserInterface


Method Summary
 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 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.
 void interrupt()
          This method is responsible for killing any processes already started on the agents, and immediately halt parsing any files.
 java.io.PrintStream openPrintStream(java.lang.String projectResultsDirectory)
          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 projectFileName)
          This is called at the beginning of a parser run on one or more tests.
 void printDebug(java.lang.String msg)
           
 void setEvaluationMode(boolean evalMode)
          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 testFile)
          This method sets the path to file file containing the syntax which will be parsed.
 

Method Detail

getSyntaxKeyWords

public java.lang.String[] getSyntaxKeyWords()
This method lists all the keywords supported by this syntax, for use in the Notepad syntax highlighting. It must be declared static.


setTestPath

public void setTestPath(java.lang.String testFile)
This method sets the path to file file containing the syntax which will be parsed.


setProjectRoot

public void setProjectRoot(java.lang.String projectRoot)
This method sets the path to root of the current project.


setPrintStream

public 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.


setProperties

public void setProperties(java.util.Properties p)
This method sets any default properties which will be required for parsing this file.


getProperties

public java.util.Properties getProperties()
This method returns all the properties obtained by parsing this test file.


setEvaluationMode

public void setEvaluationMode(boolean evalMode)
If set to true, the parser does not actually make contact with the agents but merely simulates the agent responses to allow standalone parsing.


parseFile

public int parseFile()
              throws java.lang.Exception
This method parses the specified file. If not in evaluation mode, it should return the status of the test run : ProtocolConstants.PASSED ProtocolConstants.FAILED ProtocolConstants.NOTRUN ProtocolConstants.UNRESOLVED

Throws:
java.lang.Exception

interrupt

public void interrupt()
This method is responsible for killing any processes already started on the agents, and immediately halt parsing any files.


getProperty

public java.lang.String getProperty(java.lang.String key)
This method retrieves the specified property from the results of parsing this file.


getProperty

public 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. If the value is not found, the defaultValue is returned.


getTestName

public java.lang.String getTestName()
This method should return a test name which will be used to display the test in the test tree.


getTestAuthor

public java.lang.String getTestAuthor()
This method should return a test Author which will be used to display the test in the test tree.


getTestDescription

public java.lang.String getTestDescription()
This method should return a test Description which will be used to display the test in the test tree.


getTestBugInfo

public java.lang.String getTestBugInfo()
This method should return a test BugInfo which will be used for displaying the test in the test tree.


getKeyWords

public java.lang.String[] getKeyWords()
This method should return all keywords associated with this test. These will be used in using the keywords to select/deselect tests in the harness.


getIncludeList

public 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.


getPropertiesIncludeList

public java.lang.String[] getPropertiesIncludeList()
This should return the list of standard java.util.Properties files which were included to parse this test file.


getTraceList

public 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.


prepare

public void prepare(java.lang.String projectFileName)
This is called at the beginning of a parser run on one or more tests.


openPrintStream

public java.io.PrintStream openPrintStream(java.lang.String projectResultsDirectory)
                                    throws java.io.FileNotFoundException
Returns a handle to the Printstream the parser will use for any output resulting from parsing this test.

Throws:
java.io.FileNotFoundException

printDebug

public void printDebug(java.lang.String msg)

finish

public void finish()
This method indicates we are finished with this parser, and disposes any reserved resources.


setStatusLabel

public 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.



See QAT project for licensing details