com.xqual.xagent.launcher
Class CLauncher

java.lang.Object
  extended by com.xqual.xagent.launcher.CLauncher
All Implemented Interfaces:
ILauncher, com.xqual.xcommon.IConstantsLog

public abstract class CLauncher
extends java.lang.Object
implements ILauncher, com.xqual.xcommon.IConstantsLog

The CLauncher is the abstract class to inherit from when implementing a launcher.

Version:
0.1
Author:
egavaldo
See Also:
ILauncher

Field Summary
 int campaignSessionId
           
 int instanceId
           
 java.util.Hashtable<java.lang.Integer,java.util.Vector<com.xqual.xcommon.type.descriptor.CIdAndNameDescriptor>> testAttachmentsHashtable
           
 java.util.Hashtable<java.lang.Integer,java.util.Vector<com.xqual.xcommon.type.descriptor.CIdAndNameDescriptor>> testcaseAttachmentsHashtable
           
 java.util.Vector<java.lang.Integer> testcaseIdVector
           
 java.util.Hashtable<java.lang.Integer,java.util.Vector<com.xqual.xcommon.type.descriptor.CIdAndNameDescriptor>> testDefectsHashtable
           
 java.util.Vector<com.xqual.xagent.CTestExecution> testExecutionVector
           
 java.util.Vector<java.lang.Integer> testIdVector
           
 java.io.OutputStream traceStream
           
 
Fields inherited from interface com.xqual.xcommon.IConstantsLog
LOG_DEFAULT_LABEL, LOG_ENABLED, LOG_HEADER_ENABLED, LOG_PRIORITY, LOG_PRIORITY_FINE, LOG_PRIORITY_INFO, LOG_PRIORITY_SEVERE, LOG_PRIORITY_WARNING, LOG_THREAD_ENABLED, LOG_TIMESTAMP_ENABLED
 
Constructor Summary
CLauncher(java.lang.String descriptor)
           
 
Method Summary
 void addAttachment(java.io.File file)
           
 void addAttachments(java.util.Vector<java.io.File> files)
           
 void clearAttachments()
           
 void deleteAttachments()
           
 CReturnStatus displayGui()
          This method will return to the XAgent the results manually entered by the test operator when using "tabular_manual.jar" This needs to be overridden by the tabular_manual launcher
 java.util.Vector<java.io.File> getAttachments()
           
 boolean getBooleanAttributeValue(java.util.Vector<com.xqual.xcommon.CAttribute> attributes, java.lang.String attributeName)
           
 boolean getBooleanParamValue(java.lang.String formName, java.lang.String paramName)
           
 boolean getBooleanParamValue(java.lang.String formName, java.lang.String paramName, int index)
           
 int getCampaignSessionId()
           
 java.util.Hashtable<java.lang.String,java.util.Vector<java.util.Hashtable<java.lang.String,com.xqual.xcommon.type.CParam>>> getConfiguration()
          This method return all the configuration parameters
 boolean getDefaultTestcaseMustBeCreated()
           
 java.lang.Double getDoubleParamValue(java.lang.String formName, java.lang.String paramName)
           
 java.lang.Double getDoubleParamValue(java.lang.String formName, java.lang.String paramName, int index)
           
 java.util.Enumeration<java.lang.String> getFormNameList()
           
 int getInstanceId()
           
 java.util.Vector<java.lang.Integer> getIntegerAttributeValues(java.util.Vector<com.xqual.xcommon.CAttribute> attributes, java.lang.String attributeName)
           
 int getIntegerParamValue(java.lang.String formName, java.lang.String paramName)
           
 int getIntegerParamValue(java.lang.String formName, java.lang.String paramName, int index)
           
 int getNbFormsWithName(java.lang.String formName)
           
 java.util.Enumeration<java.lang.String> getParamNameList(java.lang.String formName)
           
 java.util.Enumeration<java.lang.String> getParamNameList(java.lang.String formName, int index)
           
 java.lang.String getParamType(java.lang.String formName, java.lang.String paramName, int index)
           
 java.lang.String getParamValue(java.lang.String formName, java.lang.String paramName, int index)
           
 java.util.Vector<java.lang.String> getStringAttributeValues(java.util.Vector<com.xqual.xcommon.CAttribute> attributes, java.lang.String attributeName)
           
 java.lang.String getStringParamValue(java.lang.String formName, java.lang.String paramName)
           
 java.lang.String getStringParamValue(java.lang.String formName, java.lang.String paramName, int index)
           
 int getSutId()
           
 boolean getSutMustBeCreated()
           
 java.lang.String getSutName()
           
 java.lang.String getSutVersion()
           
 java.util.Vector<com.xqual.xcommon.type.descriptor.CIdAndNameDescriptor> getTestAttachments(int testId)
           
 java.util.Vector<com.xqual.xcommon.type.descriptor.CIdAndNameDescriptor> getTestcaseAttachments(int testcaseId)
           
 java.util.Vector<java.lang.Integer> getTestcaseIdVector()
           
 java.util.Vector<com.xqual.xcommon.type.descriptor.CIdAndNameDescriptor> getTestDefects(int testId)
           
 java.util.Vector<com.xqual.xagent.CTestExecution> getTestExecutionVector()
           
 java.util.Vector<java.lang.Integer> getTestIdVector()
           
 boolean isReadyToBeFinalized()
           
 void printAttributes(java.util.Vector<com.xqual.xcommon.CAttribute> attributes)
           
 void printConfiguration()
           
 void printParams(java.util.Vector<com.xqual.xcommon.type.CParam> params)
           
 void printTestExecutionVector()
           
 void redirectTraces(java.io.PrintStream printStream)
          This method is used to redirect traces to a specific output stream.
 void setCampaignSessionAndInstanceId(int campaignSessionId, int instanceId)
          This method indicates the launcher the current session id (useful only for the manual launchers for bug submission)
 void setConfiguration(java.util.Hashtable<java.lang.String,java.util.Vector<java.util.Hashtable<java.lang.String,com.xqual.xcommon.type.CParam>>> groupParamHashtable)
          This method configures the launcher with some configuration parameters This version is much more practical when used from the launcher itself to set configuration of other launchers as you don't have to build an xml document
 void setConfiguration(org.w3c.dom.Node configuration)
          This method configures the launcher with some configuration parameters set by the test operator from the manager
 void setSutDetails(int sutId, java.lang.String sutName, java.lang.String sutVersion)
          This method is used to set the sut details.
 void setSutId(int sutId)
           
 void setSutMustBeCreated(boolean sutMustBeCreated)
           
 void setSutName(java.lang.String sutName)
           
 void setSutVersion(java.lang.String sutVersion)
           
 void setTestAttachmentsHashtable(java.util.Hashtable<java.lang.Integer,java.util.Vector<com.xqual.xcommon.type.descriptor.CIdAndNameDescriptor>> testAttachmentsHashtable)
           
 void setTestcaseAttachmentsHashtable(java.util.Hashtable<java.lang.Integer,java.util.Vector<com.xqual.xcommon.type.descriptor.CIdAndNameDescriptor>> testcaseAttachmentsHashtable)
           
 void setTestcaseIdVector(java.util.Vector<java.lang.Integer> testcaseIdVector)
           
 void setTestDefectsHashtable(java.util.Hashtable<java.lang.Integer,java.util.Vector<com.xqual.xcommon.type.descriptor.CIdAndNameDescriptor>> testDefectsHashtable)
           
 void setTestExecutionVector(java.util.Vector<com.xqual.xagent.CTestExecution> testExecutionVector)
          These methods are called before initialize() by XAgent
 void setTestIdVector(java.util.Vector<java.lang.Integer> testIdVector)
           
 void trace(short priority, java.lang.String trace)
           
 void traceln(short priority, java.lang.String trace)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.xqual.xagent.launcher.ILauncher
initialize, postRun, preRun, run, terminate
 

Field Detail

traceStream

public java.io.OutputStream traceStream

campaignSessionId

public int campaignSessionId

instanceId

public int instanceId

testExecutionVector

public java.util.Vector<com.xqual.xagent.CTestExecution> testExecutionVector

testIdVector

public java.util.Vector<java.lang.Integer> testIdVector

testcaseIdVector

public java.util.Vector<java.lang.Integer> testcaseIdVector

testAttachmentsHashtable

public java.util.Hashtable<java.lang.Integer,java.util.Vector<com.xqual.xcommon.type.descriptor.CIdAndNameDescriptor>> testAttachmentsHashtable

testDefectsHashtable

public java.util.Hashtable<java.lang.Integer,java.util.Vector<com.xqual.xcommon.type.descriptor.CIdAndNameDescriptor>> testDefectsHashtable

testcaseAttachmentsHashtable

public java.util.Hashtable<java.lang.Integer,java.util.Vector<com.xqual.xcommon.type.descriptor.CIdAndNameDescriptor>> testcaseAttachmentsHashtable
Constructor Detail

CLauncher

public CLauncher(java.lang.String descriptor)
Method Detail

setSutDetails

public void setSutDetails(int sutId,
                          java.lang.String sutName,
                          java.lang.String sutVersion)
This method is used to set the sut details. In the implementation of the launcher, the call to this method is optional.

Parameters:
sutId - the unique identifier of the SUT
sutName - the name of the SUT
sutVersion - the version of the SUT

redirectTraces

public void redirectTraces(java.io.PrintStream printStream)
This method is used to redirect traces to a specific output stream.

You can choose whatever PrintStream you wish .

Parameters:
printStream - an output stream where to redirect traces to

setConfiguration

public void setConfiguration(org.w3c.dom.Node configuration)
This method configures the launcher with some configuration parameters set by the test operator from the manager


setConfiguration

public void setConfiguration(java.util.Hashtable<java.lang.String,java.util.Vector<java.util.Hashtable<java.lang.String,com.xqual.xcommon.type.CParam>>> groupParamHashtable)
This method configures the launcher with some configuration parameters This version is much more practical when used from the launcher itself to set configuration of other launchers as you don't have to build an xml document


getConfiguration

public java.util.Hashtable<java.lang.String,java.util.Vector<java.util.Hashtable<java.lang.String,com.xqual.xcommon.type.CParam>>> getConfiguration()
This method return all the configuration parameters


setCampaignSessionAndInstanceId

public void setCampaignSessionAndInstanceId(int campaignSessionId,
                                            int instanceId)
This method indicates the launcher the current session id (useful only for the manual launchers for bug submission)


setTestExecutionVector

public void setTestExecutionVector(java.util.Vector<com.xqual.xagent.CTestExecution> testExecutionVector)
These methods are called before initialize() by XAgent


setTestIdVector

public void setTestIdVector(java.util.Vector<java.lang.Integer> testIdVector)

setTestcaseIdVector

public void setTestcaseIdVector(java.util.Vector<java.lang.Integer> testcaseIdVector)

setTestAttachmentsHashtable

public void setTestAttachmentsHashtable(java.util.Hashtable<java.lang.Integer,java.util.Vector<com.xqual.xcommon.type.descriptor.CIdAndNameDescriptor>> testAttachmentsHashtable)

setTestDefectsHashtable

public void setTestDefectsHashtable(java.util.Hashtable<java.lang.Integer,java.util.Vector<com.xqual.xcommon.type.descriptor.CIdAndNameDescriptor>> testDefectsHashtable)

setTestcaseAttachmentsHashtable

public void setTestcaseAttachmentsHashtable(java.util.Hashtable<java.lang.Integer,java.util.Vector<com.xqual.xcommon.type.descriptor.CIdAndNameDescriptor>> testcaseAttachmentsHashtable)

getTestIdVector

public java.util.Vector<java.lang.Integer> getTestIdVector()

getTestcaseIdVector

public java.util.Vector<java.lang.Integer> getTestcaseIdVector()

getTestAttachments

public java.util.Vector<com.xqual.xcommon.type.descriptor.CIdAndNameDescriptor> getTestAttachments(int testId)

getTestDefects

public java.util.Vector<com.xqual.xcommon.type.descriptor.CIdAndNameDescriptor> getTestDefects(int testId)

getTestcaseAttachments

public java.util.Vector<com.xqual.xcommon.type.descriptor.CIdAndNameDescriptor> getTestcaseAttachments(int testcaseId)

displayGui

public CReturnStatus displayGui()
This method will return to the XAgent the results manually entered by the test operator when using "tabular_manual.jar" This needs to be overridden by the tabular_manual launcher


isReadyToBeFinalized

public boolean isReadyToBeFinalized()

printTestExecutionVector

public void printTestExecutionVector()

printConfiguration

public void printConfiguration()

printAttributes

public void printAttributes(java.util.Vector<com.xqual.xcommon.CAttribute> attributes)

printParams

public void printParams(java.util.Vector<com.xqual.xcommon.type.CParam> params)

getFormNameList

public java.util.Enumeration<java.lang.String> getFormNameList()

getNbFormsWithName

public int getNbFormsWithName(java.lang.String formName)

getParamNameList

public java.util.Enumeration<java.lang.String> getParamNameList(java.lang.String formName)

getParamNameList

public java.util.Enumeration<java.lang.String> getParamNameList(java.lang.String formName,
                                                                int index)

getParamType

public java.lang.String getParamType(java.lang.String formName,
                                     java.lang.String paramName,
                                     int index)

getParamValue

public java.lang.String getParamValue(java.lang.String formName,
                                      java.lang.String paramName,
                                      int index)

getStringParamValue

public java.lang.String getStringParamValue(java.lang.String formName,
                                            java.lang.String paramName)
                                     throws com.xqual.xcommon.type.CParamParsingException
Throws:
com.xqual.xcommon.type.CParamParsingException

getStringParamValue

public java.lang.String getStringParamValue(java.lang.String formName,
                                            java.lang.String paramName,
                                            int index)
                                     throws com.xqual.xcommon.type.CParamParsingException
Throws:
com.xqual.xcommon.type.CParamParsingException

getIntegerParamValue

public int getIntegerParamValue(java.lang.String formName,
                                java.lang.String paramName)
                         throws com.xqual.xcommon.type.CParamParsingException
Throws:
com.xqual.xcommon.type.CParamParsingException

getIntegerParamValue

public int getIntegerParamValue(java.lang.String formName,
                                java.lang.String paramName,
                                int index)
                         throws com.xqual.xcommon.type.CParamParsingException
Throws:
com.xqual.xcommon.type.CParamParsingException

getDoubleParamValue

public java.lang.Double getDoubleParamValue(java.lang.String formName,
                                            java.lang.String paramName)
                                     throws com.xqual.xcommon.type.CParamParsingException
Throws:
com.xqual.xcommon.type.CParamParsingException

getDoubleParamValue

public java.lang.Double getDoubleParamValue(java.lang.String formName,
                                            java.lang.String paramName,
                                            int index)
                                     throws com.xqual.xcommon.type.CParamParsingException
Throws:
com.xqual.xcommon.type.CParamParsingException

getBooleanParamValue

public boolean getBooleanParamValue(java.lang.String formName,
                                    java.lang.String paramName)
                             throws com.xqual.xcommon.type.CParamParsingException
Throws:
com.xqual.xcommon.type.CParamParsingException

getBooleanParamValue

public boolean getBooleanParamValue(java.lang.String formName,
                                    java.lang.String paramName,
                                    int index)
                             throws com.xqual.xcommon.type.CParamParsingException
Throws:
com.xqual.xcommon.type.CParamParsingException

getStringAttributeValues

public java.util.Vector<java.lang.String> getStringAttributeValues(java.util.Vector<com.xqual.xcommon.CAttribute> attributes,
                                                                   java.lang.String attributeName)
                                                            throws CAttributeParsingException
Throws:
CAttributeParsingException

getIntegerAttributeValues

public java.util.Vector<java.lang.Integer> getIntegerAttributeValues(java.util.Vector<com.xqual.xcommon.CAttribute> attributes,
                                                                     java.lang.String attributeName)
                                                              throws CAttributeParsingException
Throws:
CAttributeParsingException

getBooleanAttributeValue

public boolean getBooleanAttributeValue(java.util.Vector<com.xqual.xcommon.CAttribute> attributes,
                                        java.lang.String attributeName)
                                 throws CAttributeParsingException
Throws:
CAttributeParsingException

getCampaignSessionId

public int getCampaignSessionId()

getInstanceId

public int getInstanceId()

getTestExecutionVector

public java.util.Vector<com.xqual.xagent.CTestExecution> getTestExecutionVector()

trace

public void trace(short priority,
                  java.lang.String trace)

traceln

public void traceln(short priority,
                    java.lang.String trace)

getSutId

public int getSutId()

getSutName

public java.lang.String getSutName()

getSutVersion

public java.lang.String getSutVersion()

getSutMustBeCreated

public boolean getSutMustBeCreated()

getDefaultTestcaseMustBeCreated

public boolean getDefaultTestcaseMustBeCreated()

setSutId

public void setSutId(int sutId)

setSutName

public void setSutName(java.lang.String sutName)

setSutVersion

public void setSutVersion(java.lang.String sutVersion)

setSutMustBeCreated

public void setSutMustBeCreated(boolean sutMustBeCreated)

addAttachment

public void addAttachment(java.io.File file)

addAttachments

public void addAttachments(java.util.Vector<java.io.File> files)

deleteAttachments

public void deleteAttachments()

getAttachments

public java.util.Vector<java.io.File> getAttachments()

clearAttachments

public void clearAttachments()