opencard.tests.testframe
Class TestFrame
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--java.awt.Panel
|
+--java.applet.Applet
|
+--opencard.tests.testframe.TestFrame
- public class TestFrame
- extends java.applet.Applet
The TestFrame class loads the testcases to execute from the test.properties
file. instatiates the testcases and executes the startTestCase method in
the test case. The stdout and stderr are redirected to a logfile. For message
display purposes a displayInfo method is provided.
- See Also:
- Serialized Form
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
LEFT_ALIGNMENT,
RIGHT_ALIGNMENT,
TOP_ALIGNMENT |
|
Method Summary |
void |
addErrorListener(ErrorListener l)
|
void |
addInfoListener(InfoListener l)
|
int |
createTestCase(java.lang.String TestCaseClass,
java.lang.String[] TestCaseParams)
Instantiate a test case and execute the start method of the test case |
void |
displayActionRequired(java.lang.String Message)
Redirection of the output to the display in order to show a user interaction message to the tester |
void |
displayError(java.lang.String Message)
Redirection of the output to the display in order to show an error message to the tester |
void |
displayInfo(java.lang.String Message)
Redirection of the output to the display in order to show a info message to the tester |
void |
fireErrorEvent()
|
void |
fireInfoEvent()
|
boolean |
getAppl()
Getter method for the Applet flag |
java.util.Vector |
getATProperties()
Getter method for the attribute properties vector |
java.lang.String |
getBuildName()
Getter method for the test build name |
java.util.Vector |
getCIProperties()
Getter method for the card initialization properties vector |
java.lang.String |
getErrorMessage()
Getter method for the ErrorMessage |
java.lang.String |
getInfoMessage()
Getter method for the InfoMessage |
java.util.Vector |
getISProperties()
Getter method for the initialization script properties vector |
java.lang.String |
getLogFileDir()
Getter method for the log file directory string |
java.lang.String |
getLogSeq()
Getter method for the log file sequence enabling string (yes: sequential logfiles enabled) |
java.util.Vector |
getOCFProperties()
Getter method for the OCF property file name vector |
java.lang.String |
getPropName()
Getter method for the test properties file name |
java.util.Vector |
getRCProperties()
Getter method for the repeat count properties vector |
int |
getTCIndex()
Getter method for the test case index |
java.util.Vector |
getTCProperties()
Getter method for the test case class properties vector |
void |
init()
|
void |
loadPropsToVector()
Loading of all test case strings of the test.properties file to a vector |
static void |
main(java.lang.String[] args)
|
void |
printErrorToLog(java.lang.String message,
java.io.PrintStream ps)
Print Error Message to Logfile |
void |
printInfoToLog(java.lang.String message,
java.io.PrintStream ps)
Print Info Message to Logfile |
void |
removeErrorListener(ErrorListener l)
|
void |
removeInfoListener(InfoListener l)
|
void |
setAppl(boolean applflag)
Setter method for the Applet flag |
void |
setATProperties(java.util.Vector atprops)
Setter method for the attribute poperties vector |
void |
setBuildName(java.lang.String bn)
Setter method for the build name |
void |
setCIProperties(java.util.Vector ciprops)
Setter method for the test case card initialization vector |
void |
setErrorMessage(java.lang.String message)
Setter method for the ErrorMessage |
void |
setInfoMessage(java.lang.String message)
Setter method for the InfoMessage |
void |
setISProperties(java.util.Vector isprops)
Setter method for the test case card initialization script vector |
void |
setLogFileDir(java.lang.String lfd)
Setter method for the log file directory string |
void |
setLogSeq(java.lang.String ls)
Setter method for the log file sequence |
void |
setOCFProperties(java.util.Vector ocfprops)
Setter method for the OCF properties file name vector |
void |
setPropName(java.lang.String pn)
Setter method for the test properties file name |
void |
setRCProperties(java.util.Vector rcprops)
Setter method for the repeat count poperties vector |
void |
setTCIndex(int index)
Setter method for the test case index |
void |
setTCProperties(java.util.Vector tcprops)
Setter method for the test case class properties vector |
void |
start()
|
void |
startTestSequence()
Redirection of stdout and std err to a logfile and instantiation and start
of all test cases in the test.properties file with the createTestCaseMethod |
| Methods inherited from class java.applet.Applet |
destroy,
getAppletContext,
getAppletInfo,
getAudioClip,
getAudioClip,
getCodeBase,
getDocumentBase,
getImage,
getImage,
getLocale,
getParameter,
getParameterInfo,
isActive,
newAudioClip,
play,
play,
resize,
resize,
setStub,
showStatus,
stop |
| Methods inherited from class java.awt.Panel |
addNotify |
| Methods inherited from class java.awt.Container |
add,
add,
add,
add,
add,
addContainerListener,
addImpl,
countComponents,
deliverEvent,
doLayout,
findComponentAt,
findComponentAt,
getAlignmentX,
getAlignmentY,
getComponent,
getComponentAt,
getComponentAt,
getComponentCount,
getComponents,
getInsets,
getLayout,
getMaximumSize,
getMinimumSize,
getPreferredSize,
insets,
invalidate,
isAncestorOf,
layout,
list,
list,
locate,
minimumSize,
paint,
paintComponents,
paramString,
preferredSize,
print,
printComponents,
processContainerEvent,
processEvent,
remove,
remove,
removeAll,
removeContainerListener,
removeNotify,
setFont,
setLayout,
update,
validate,
validateTree |
| Methods inherited from class java.awt.Component |
action,
add,
addComponentListener,
addFocusListener,
addInputMethodListener,
addKeyListener,
addMouseListener,
addMouseMotionListener,
addPropertyChangeListener,
addPropertyChangeListener,
bounds,
checkImage,
checkImage,
coalesceEvents,
contains,
contains,
createImage,
createImage,
disable,
disableEvents,
dispatchEvent,
enable,
enable,
enableEvents,
enableInputMethods,
firePropertyChange,
getBackground,
getBounds,
getBounds,
getColorModel,
getComponentOrientation,
getCursor,
getDropTarget,
getFont,
getFontMetrics,
getForeground,
getGraphics,
getHeight,
getInputContext,
getInputMethodRequests,
getLocation,
getLocation,
getLocationOnScreen,
getName,
getParent,
getPeer,
getSize,
getSize,
getToolkit,
getTreeLock,
getWidth,
getX,
getY,
gotFocus,
handleEvent,
hasFocus,
hide,
imageUpdate,
inside,
isDisplayable,
isDoubleBuffered,
isEnabled,
isFocusTraversable,
isLightweight,
isOpaque,
isShowing,
isValid,
isVisible,
keyDown,
keyUp,
list,
list,
list,
location,
lostFocus,
mouseDown,
mouseDrag,
mouseEnter,
mouseExit,
mouseMove,
mouseUp,
move,
nextFocus,
paintAll,
postEvent,
prepareImage,
prepareImage,
printAll,
processComponentEvent,
processFocusEvent,
processInputMethodEvent,
processKeyEvent,
processMouseEvent,
processMouseMotionEvent,
remove,
removeComponentListener,
removeFocusListener,
removeInputMethodListener,
removeKeyListener,
removeMouseListener,
removeMouseMotionListener,
removePropertyChangeListener,
removePropertyChangeListener,
repaint,
repaint,
repaint,
repaint,
requestFocus,
reshape,
setBackground,
setBounds,
setBounds,
setComponentOrientation,
setCursor,
setDropTarget,
setEnabled,
setForeground,
setLocale,
setLocation,
setLocation,
setName,
setSize,
setSize,
setVisible,
show,
show,
size,
toString,
transferFocus |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
ps
public java.io.PrintStream ps
ou
public java.io.PrintStream ou
er
public java.io.PrintStream er
errorListeners
public java.util.Vector errorListeners
infoListeners
public java.util.Vector infoListeners
TestFrame
public TestFrame()
main
public static void main(java.lang.String[] args)
init
public void init()
- Overrides:
- init in class java.applet.Applet
start
public void start()
- Overrides:
- start in class java.applet.Applet
createTestCase
public int createTestCase(java.lang.String TestCaseClass,
java.lang.String[] TestCaseParams)
- Instantiate a test case and execute the start method of the test case
- Parameters:
TestCaseClass - The name of the test case class to instantiate- Returns:
- Return code of the test case (0 means test performed successfully)
loadPropsToVector
public void loadPropsToVector()
- Loading of all test case strings of the test.properties file to a vector
startTestSequence
public void startTestSequence()
- Redirection of stdout and std err to a logfile and instantiation and start
of all test cases in the test.properties file with the createTestCaseMethod
printErrorToLog
public void printErrorToLog(java.lang.String message,
java.io.PrintStream ps)
- Print Error Message to Logfile
- Parameters:
Message - Message to printPrintStream -
printInfoToLog
public void printInfoToLog(java.lang.String message,
java.io.PrintStream ps)
- Print Info Message to Logfile
- Parameters:
Message - Message to printPrintStream -
displayError
public void displayError(java.lang.String Message)
- Redirection of the output to the display in order to show an error message to the tester
- Parameters:
Message - Message to display
displayInfo
public void displayInfo(java.lang.String Message)
- Redirection of the output to the display in order to show a info message to the tester
- Parameters:
Message - Message to display
displayActionRequired
public void displayActionRequired(java.lang.String Message)
- Redirection of the output to the display in order to show a user interaction message to the tester
- Parameters:
Message - Message to display
getTCIndex
public int getTCIndex()
- Getter method for the test case index
- Returns:
- int Test case index
getATProperties
public java.util.Vector getATProperties()
- Getter method for the attribute properties vector
- Returns:
- Vector vector that contains the test case attributes
getISProperties
public java.util.Vector getISProperties()
- Getter method for the initialization script properties vector
- Returns:
- Vector vector that contains the test case card initialization script class
getCIProperties
public java.util.Vector getCIProperties()
- Getter method for the card initialization properties vector
- Returns:
- Vector vector that contains the test case card initialization file
getErrorMessage
public java.lang.String getErrorMessage()
- Getter method for the ErrorMessage
- Returns:
- String message holding the error string
getInfoMessage
public java.lang.String getInfoMessage()
- Getter method for the InfoMessage
- Returns:
- String message holding the info string
getRCProperties
public java.util.Vector getRCProperties()
- Getter method for the repeat count properties vector
- Returns:
- Vector vector that contains the test case repeat counts
getTCProperties
public java.util.Vector getTCProperties()
- Getter method for the test case class properties vector
- Returns:
- Vector vector that contains the test case names
getOCFProperties
public java.util.Vector getOCFProperties()
- Getter method for the OCF property file name vector
- Returns:
- Vector vector that contains the OCF property file names
getLogFileDir
public java.lang.String getLogFileDir()
- Getter method for the log file directory string
- Returns:
- String string that contains the log file directory
getLogSeq
public java.lang.String getLogSeq()
- Getter method for the log file sequence enabling string (yes: sequential logfiles enabled)
- Returns:
- String string that contains yes if the sequential logfiles should be generated with a timestamp
getBuildName
public java.lang.String getBuildName()
- Getter method for the test build name
- Returns:
- String string that contains the build name
getPropName
public java.lang.String getPropName()
- Getter method for the test properties file name
- Returns:
- String string that contains the properties file name
getAppl
public boolean getAppl()
- Getter method for the Applet flag
- Returns:
- boolean if true -> the TestFrame is executed as Applet
setBuildName
public void setBuildName(java.lang.String bn)
- Setter method for the build name
- Parameters:
String - string that contains the test build name
setPropName
public void setPropName(java.lang.String pn)
- Setter method for the test properties file name
- Parameters:
String - string that contains the properties file name
setTCIndex
public void setTCIndex(int index)
- Setter method for the test case index
- Parameters:
int - Test case index
setATProperties
public void setATProperties(java.util.Vector atprops)
- Setter method for the attribute poperties vector
- Parameters:
Vector - vector that contains the test case attributes
setErrorMessage
public void setErrorMessage(java.lang.String message)
- Setter method for the ErrorMessage
- Parameters:
String - message holding the error string
setInfoMessage
public void setInfoMessage(java.lang.String message)
- Setter method for the InfoMessage
- Parameters:
String - message holding the info string
setRCProperties
public void setRCProperties(java.util.Vector rcprops)
- Setter method for the repeat count poperties vector
- Parameters:
Vector - vector that contains the test case repeat counts
setTCProperties
public void setTCProperties(java.util.Vector tcprops)
- Setter method for the test case class properties vector
- Parameters:
Vector - vector that contains the test case names
setISProperties
public void setISProperties(java.util.Vector isprops)
- Setter method for the test case card initialization script vector
- Parameters:
Vector - vector that contains the test card initialization script classes
setCIProperties
public void setCIProperties(java.util.Vector ciprops)
- Setter method for the test case card initialization vector
- Parameters:
Vector - vector that contains the test card initialization file
setOCFProperties
public void setOCFProperties(java.util.Vector ocfprops)
- Setter method for the OCF properties file name vector
- Parameters:
Vector - vector that contains the OCF property file names
setLogFileDir
public void setLogFileDir(java.lang.String lfd)
- Setter method for the log file directory string
- Parameters:
String - string that contains the log file directory
setLogSeq
public void setLogSeq(java.lang.String ls)
- Setter method for the log file sequence
- Parameters:
String - string that contains yes if the sequential logfiles should be generated with a timestamp
setAppl
public void setAppl(boolean applflag)
- Setter method for the Applet flag
- Parameters:
boolean - if true -> TestFrame is running as an Applet
fireErrorEvent
public void fireErrorEvent()
fireInfoEvent
public void fireInfoEvent()
addErrorListener
public void addErrorListener(ErrorListener l)
addInfoListener
public void addInfoListener(InfoListener l)
removeErrorListener
public void removeErrorListener(ErrorListener l)
removeInfoListener
public void removeInfoListener(InfoListener l)
|