If you are using Selenium, the following documentation will help you get going quickly:
The Lifecycle of a ZIP is very closely tied to that of a ZBot. The following flow shows what the ZBot (bolded) actions are and {zip} shows where ZIP actions can interface with that flow:
Batch Started: Update Batch Status {zip}
Before Test script execution starts: Update Batch Status {zip}
Run Test script: {zip}
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.
Update Test script Execution Result {zip}
After testcase Executed {zip}
Batch Finished {zip}
The Zephyr server hands off the entire batch of testcases (kicked off from within the UI) to the appropriate ZBot. ZBot calls following routines (methods) on ZIP, each of which can be intercepted and re-written in a custom ZIP.
| Method | Description |
|---|---|
| public void batchStart() | Gets called once per execution batch |
| public void testcaseExecutionStart() | Gets called once for every testcase |
| public void testcaseExecutionRun() | It spawns a dedicated native process for each testcase. Serial mode waits for the process to finish. Parallel mode doesn't. In custom ZIP this could be done in a separate Thread and that dedicated thread can wait for the process to finish. Alternatively, custom ZIP can store all processIDs in a hash and wait for them to finish in batchEnd() |
| public void testcaseExecutionResult() | Gets called once for each testcase. In parallel mode, it wont be very useful as it wouldn't know about the status of execution |
| public void testcaseExecutionEnd() | Gets called once for each testcase. In parallel mode, it will get called immediately after testcase kickoff |
| public void testcaseExecutionEnd() | Gets called once for each testcase. In parallel mode, it will get called immediately after testcase kickoff |
| public void batchEnd() | Gets called once per execution batch. In parallel mode, this method can be used to wait for all testcases to finish and send the results |
public void batchStart()
testcaseBatchExecution.getTestcaseExecutionList()
public void testcaseExecutionStart()
public void testcaseExecutionRun()
public void testcaseExecutionResult()
public void testcaseExecutionEnd()
public void batchEnd()
wrapper.java.classpath.5=../plugin/ com.thed.launcher.DefaultZBotScriptLaunch (line 17)
wrapper.java.classpath.6=../plugin/testzip-ZIP-1.0.jar
wrapper.java.classpath.7=../plugin/commons-lang-2.4.jar
wrapper.java.classpath.8=../plugin/others.jar
scriptLauncher=com.testzip.zip.TestCompleteLauncher.java