com.xqual.xagent.launcher
Interface ILauncher

All Known Implementing Classes:
CLauncher

public interface ILauncher

The ILauncher interface. This MUST be implemented by any launcher. Any launcher implementation should inherits from CLauncher which implements this interface.

Version:
0.1
Author:
egavaldo
See Also:
CLauncher

Method Summary
 CReturnStatus initialize(int sutId, java.lang.String sutName, java.lang.String sutVersion)
          The initialize method is executed once at the instanciation of the launcher.
 CReturnStatus postRun(int testId, java.lang.String testPath, java.lang.String testName)
          The postRun step is executed after all the testcases have been executed.
 CReturnStatus preRun(int testId, java.lang.String testPath, java.lang.String testName, java.util.Vector<com.xqual.xcommon.CAttribute> attributes, java.lang.String additionalInfo)
          The preRun step is executed before all the testcases are run.
 CReturnStatus run(int testId, java.lang.String testPath, java.lang.String testName, int testcaseIndex, java.lang.String testcaseName, java.lang.String additionalInfo)
          The run step is the main entry point to execute a particular testcase.
 CReturnStatus terminate()
          The terminate method is executed once when the launcher is not anymore used.
 

Method Detail

initialize

CReturnStatus initialize(int sutId,
                         java.lang.String sutName,
                         java.lang.String sutVersion)
The initialize method is executed once at the instanciation of the launcher.

You can put there all operations of initialization that needs to be done before everything else.

Parameters:
sutId - the id of the SUT as appearing in XStudio (note that that it can be ignored most of the time)
sutName - the name of the SUT as appearing in XStudio
sutVersion - the version of the SUT as appearing in XStudio
Returns:
a CReturnStatus object containing data about the result of the operation
See Also:
CReturnStatus

preRun

CReturnStatus preRun(int testId,
                     java.lang.String testPath,
                     java.lang.String testName,
                     java.util.Vector<com.xqual.xcommon.CAttribute> attributes,
                     java.lang.String additionalInfo)
The preRun step is executed before all the testcases are run.

You can put there all operations of initialization that needs to be done before all testcases are executed.

Parameters:
testId - the Id of the test (note that that it can be ignored most of the time)
testPath - an absolute path giving the base location of the test
testName - the name of the test (this is generally used to retrieve a specific file on the disk)
additionalInfo - an optional additional information attached to the test
Returns:
a CReturnStatus object containing data about the result of the operation
See Also:
CReturnStatus

run

CReturnStatus run(int testId,
                  java.lang.String testPath,
                  java.lang.String testName,
                  int testcaseIndex,
                  java.lang.String testcaseName,
                  java.lang.String additionalInfo)
The run step is the main entry point to execute a particular testcase.

The testcase must handle correctly all cleanup tasks (apart from operations previously executed in preRun

Parameters:
testId - the Id of the test (note that that it can be ignored most of the time)
testPath - an absolute path giving the base location of the test
testName - the name of the test (this is generally used to retrieve a specific file on the disk)
testcaseIndex - an index giving specifying which test case to run
testcaseName - the name of the test case to run
additionalInfo - an optional additional information attached to the test
Returns:
a CReturnStatus object containing data about the result of the operation
See Also:
CReturnStatus

postRun

CReturnStatus postRun(int testId,
                      java.lang.String testPath,
                      java.lang.String testName)
The postRun step is executed after all the testcases have been executed.

You can put there all operations of cleanup necessary to bring back the SUT to its initial state. It's a good idea to rollback what were previsously done in the preRun step.

Parameters:
testId - the Id of the test (note that that it can be ignored most of the time)
testPath - an absolute path giving the base location of the test
testName - the name of the test (this is generally used to retrieve a specific file on the disk)
Returns:
a CReturnStatus object containing data about the result of the operation
See Also:
CReturnStatus

terminate

CReturnStatus terminate()
The terminate method is executed once when the launcher is not anymore used.

You can put there all operations of termination that needs to be done after all the tests have been executed.

Returns:
a CReturnStatus object containing data about the result of the operation
See Also:
CReturnStatus