Implementation
There are basically 5 methods to implement.The 5 methods to implement
initialize(sutId, sutName, sutVersion)
The initialize method is executed once at the instantiation of the launcher by the agent or by XStudio.You can put there all operations of initialization that needs to be done before everything else.
This method is called by XStudio when the session starts. This is the right place to setup the test environment. Sometimes it is useful to know which SUT is going to be tested so all the SUT information are passed to the launcher at this point. This is also where we generally parse the configuration information with the
getXXXParamValue() methods.
preRun(testId, testPath, testName, attributes, 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.
This is called when a new test is about to start. All the attributes of the test are passed (as well a s the additional Info string) so that the launcher can eventually use them.
run(testId, testPath, testName, testcaseIndex, testcaseName, 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
This is in this method that you will have to execute your test case.
postRun(testId, testPath, 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.
This is called when a new test is about to be terminated: all test cases have been executed. We're leaving this test and are going to get to the next one.
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.
Basically you do here all the cleanup.
The APIs
In each of these method implementation you can use any API included in the SDK.The included APIs include methods to:
- execute processes synchronously or asynchronously,
- monitor a task using a timer,
- parse XML files,
- download files from shared folders/ftp server,
- add attachments to the test case execution in XStudio
- plus many utilities (conversion, file/date/time manipulation, etc.)
- etc.
xxx.xml configuration descriptor if you wish.This XML file describes the form displayed to the user to create configurations. All the information you are going to describe here are going to be filled by the campaign session creator and are going to be passed to the laucher. From the launcher you can get those values by calling the methods
getXXXParamValue().

