Package com.thed.launcher
Class ScriptProcessor
java.lang.Object
com.thed.launcher.ScriptProcessor
- All Implemented Interfaces:
Runnable
This class executes batch script in separate thread.
It uses an
IZBotScriptLauncher
instance for starting/stopping the batch process and
finally sends the overall batch status along with TestcaseBatchExecution details to server.- Author:
- ZephyrDev
-
Constructor Summary
ConstructorsConstructorDescriptionScriptProcessor
(Agent agent, TestcaseBatchExecution testcaseBatchExecution, String url, org.apache.commons.configuration.PropertiesConfiguration properties) -
Method Summary
Modifier and TypeMethodDescriptionThis method is used by zephyrAgent class to fetch realtime status.boolean
Returns the boolean flag to check the overall execution is completed.void
run()
This method loops through the entire batch of test cases, executes them and communicates the real-time status of each testcase back to the server.
-
Constructor Details
-
ScriptProcessor
public ScriptProcessor(Agent agent, TestcaseBatchExecution testcaseBatchExecution, String url, org.apache.commons.configuration.PropertiesConfiguration properties)
-
-
Method Details
-
run
This method loops through the entire batch of test cases, executes them and communicates the real-time status of each testcase back to the server.
The order of LifeCycle methods is given below :-
<IZBotScriptLauncher.batchStart()
> - Invoked once before start of batch.
<IZBotScriptLauncher.testcaseExecutionStart()
> - invoked once before start of each testcase.
<IZBotScriptLauncher.testcaseExecutionRun()
> - This method executes testcase.
In sequential mode, ZBot will wait for each script to finish, gather the process status and update test status in Zephyr Server via a webservice.
Exit Status 0 is translated as pass. Any Non Zero values is treated as fail.
In parallel mode, it will launch them all without waiting for it to finish. It also, doesnt update the test execution status.
<IZBotScriptLauncher.testcaseExecutionResult()
> - process testcase result.
<IZBotScriptLauncher.testcaseExecutionEnd()
> - invoked once after each testcase is done executing.
<IZBotScriptLauncher.batchEnd()
> - invoked once after end of batch. -
getRealtimeStatus
This method is used by zephyrAgent class to fetch realtime status. -
isCompleted
Returns the boolean flag to check the overall execution is completed.
-