Package com.thed.launcher
Interface IZBotScriptLauncher
- All Known Implementing Classes:
AbstractZBotScriptLauncher
public interface IZBotScriptLauncher
This interface is the parent class for all the ZBot interceptors. It contains methods that are executed
in a particular sequence by
ScriptProcessor.run()
as explained below. These methods allow complete
control over testcase execution flow and can optionally be overridden in custom interceptor.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
batchEnd()
This method is invoked once after end of batch.void
This method is invoked once before start of testcase batch execution.boolean
Enable real-time result update.getAgent()
getter for AgentLauncher must keep updated the status of testcase at all times.utility method to get Current TestcaseExecutionutility method to get TestcaseBatchExecutiongetUrl()
getter for URLorg.apache.commons.configuration.PropertiesConfiguration
void
setter for Agent.void
setCurrentTestcaseExecution
(TestcaseExecution currentTestcaseExecution) utility method to set Current TestcaseExecution.void
setTestcaseBatchExecution
(TestcaseBatchExecution testcaseBatchExecution) utility method to set TestcaseBatchExecution.void
setter for URL.void
setZbotProperties
(org.apache.commons.configuration.PropertiesConfiguration zbotProperties) Other misc properties that are read from zbot.properties file, are pushed into this hashmap.void
This method is invoked once after each testcase is done executing.void
Use this method to process testcase result.void
This method actually executes the testcase.void
This method is invoked once before start of each testcase.void
-
Method Details
-
batchStart
void batchStart()This method is invoked once before start of testcase batch execution. Any kind of initial setup activity can be performed here. for example checking out scripts from version control systems(SVN) or databases, information to be written to logs for recording startup activity, etc.
The TestcaseBatchExecution object is set in theScriptProcessor.run()
method usingsetTestcaseBatchExecution(TestcaseBatchExecution)
method before actually starting the batch execution.
See AlsobatchStart()
-
testcaseExecutionStart
void testcaseExecutionStart()This method is invoked once before start of each testcase.
TheScriptProcessor.run()
method loops through each of the testcases within a batch and callstestcaseExecutionStart()
method just before starting the testcase execution.
See AlsotestcaseExecutionStart()
-
testcaseExecutionRun
void testcaseExecutionRun()This method actually executes the testcase. Custom implementations of this method should not throw exceptions. Exceptions must be caught and appropriately dealt with.
TheScriptProcessor.run()
method loops through each of the testcases within a batch and callstestcaseExecutionRun()
method to execute the testcase, immediately after callingtestcaseExecutionStart()
method.
See AlsotestcaseExecutionRun()
-
testcaseExecutionResult
void testcaseExecutionResult()Use this method to process testcase result.
After the testcase{s} has been executed, the result{s} are processed withinScriptProcessor.run()
method by callingtestcaseExecutionResult()
method.
See AlsotestcaseExecutionResult()
-
testcaseExecutionEnd
void testcaseExecutionEnd()This method is invoked once after each testcase is done executing. If there is any cleanup task that need to be performed after each testcase, this is ideal place to do it.
TheScriptProcessor.run()
method by callstestcaseExecutionEnd()
method.
See AlsotestcaseExecutionEnd()
-
getAgentStatus
Launcher must keep updated the status of testcase at all times. E.g. "batch started", "tc#5 executed", "batch ended", etc. This status is updated in Agent. -
batchEnd
void batchEnd()This method is invoked once after end of batch. Any batch cleanup activities can be performed in this method.
Once all the testcases within a batch have been executed,theScriptProcessor.run()
method calls thebatchEnd()
method.
See AlsobatchEnd()
-
enableResultUpdate
boolean enableResultUpdate()Enable real-time result update.- Returns:
- boolean
Once the script has been executed,ScriptProcessor.run()
method updates the Zbot agent real-time status usingenableResultUpdate()
method and communicates this update back to the Zephyr server.
See AlsoenableResultUpdate()
-
getAgent
getter for Agent -
setAgent
setter for Agent.
Before starting the batch execution of testcases, theScriptProcessor.run()
method sets the Agent usingsetAgent(Agent)
method. -
getUrl
getter for URL -
setUrl
setter for URL.
Before starting the batch execution of testcases, theScriptProcessor.run()
method sets the 'url' which is a string object usingsetUrl(String)
method. -
getZbotProperties
org.apache.commons.configuration.PropertiesConfiguration getZbotProperties()- Returns:
- the zbotProperties
-
setZbotProperties
Other misc properties that are read from zbot.properties file, are pushed into this hashmap.- Parameters:
zbotProperties
- the zbotProperties to set
-
getTestcaseBatchExecution
utility method to get TestcaseBatchExecution -
setTestcaseBatchExecution
utility method to set TestcaseBatchExecution.
The TestcaseBatchExecution object is set in theScriptProcessor.run()
method usingsetTestcaseBatchExecution(TestcaseBatchExecution)
method before starting the batch execution. -
getCurrentTestcaseExecution
utility method to get Current TestcaseExecution -
setCurrentTestcaseExecution
utility method to set Current TestcaseExecution.
Every time theScriptProcessor.run()
method loops through each of the testcases within a batch, it sets the current testcase usingsetCurrentTestcaseExecution(TestcaseExecution)
method. -
testcaseParseExecutionResult
void testcaseParseExecutionResult()
-