Thursday 21 August 2014

Zephyr Test Management Tool Integration with Telerik Test Studio

Overview:
This article provide the approach to integrate Telerik Test Studio scripts with Zephyr and will perform following activities:
  • Test case script kick-off from Zephyr
  • Test case script result updation in Zephyr

Pre-Requisite:
Below are the pre-requisite:
  • Automated Test case is created in Zephyr. (Note: Test case type will show “A”)
  • Automated Test case is appearing in Zephyr execution panel. (Note: “E” button will appear against the test case to start the execution of script)
  • Zephyr Zbot should be installed, configured and started properly in any machine. (Note: Please contact Zephyr support team for ZBot setup)

Creation of Java Wrapper:
We have to create a Java wrapper code which will have following features:
  • Read the Telerik result file.
  • Fetch the test case result (either Pass or Fail).
  • Update the status in Zephyr by get the results for “currentTestcaseExecution” and call “scriptUtil.updateTestcaseExecutionResult()” in “public void testcaseExecutionResult()” method.
  • Export the java project in *.jar file.

Deployment of Java Wrapper:
Below are the steps to deploy the Java wrapper:
  1. In $ZBOT_HOME\conf\wrapper.conf, add following entries
  2. wrapper.java.mainclass=com.thed.wrapper.ZephyrWrapperSimpleApp
    wrapper.java.classpath.5=../plugin/ZephyrWrapperCode.jar
    wrapper.java.classpath.6=../lib/ZephyrWrapperCode.jar
  3. Copy jar file to $ZBOT_HOME\lib\
  4. Copy jar file to $ZBOT_HOME\plugin\
  5. Make sure scriptLauncher property is set in $ZBOT_HOME\conf\zbot.properties
  6. scriptLauncher=com.testzip.zip.ZephyrWrapperCode
  7. Restart ZBot

Approach:
  • In Zephyr automation test case “Path” field, we have to provide the parameterize batch file path with parameter value as Telerik web test name so that specific test case script should execute.
  • Eg: In “Path” give value as “C:\TelerikExecution\ZephyrTelerik.bat DummyWebTest”
  • Batch file will have Telerik Project web test execution through command prompt.
  • Click on “E” in Zephyr, select the ZBot and Click on “Run”.
  • Telerik script will be executed through batch file, once execution will over Zephyr wrapper will read the test case test cases result and will update the status in Zephyr.
  • Flow diagram