Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

What is a ZBot? Image Added

...

Zephyr Bots or ZBots are software agents that reside on target automation systems and form the link between the Zephyr Server and the automation tool being used on the target automation system. Based on user action in Test Execution (where the "E" button is clicked and an automation script(s) is kicked off), the Zephyr Server connects with the target ZBot and sends over execution information to execute an individual test script or multiple test scripts.

Download and Install ZBot

To download and install your pre-configured zBot, please use the Download Pre-Configured zBot button provided in your Zephyr application.

Zephyr provides our users with an option to download a pre-configured zBot. The zBot can be downloaded directly within the Zephyr application for any individual user. 

  • When downloading the zBot from the application, users are able to rename their zBot.

    • When renaming your zBot and viewing it in Vortex, it will display the name of the zBot given and the IP address of the machine.

  • Downloading the zBot will also create a Zephyr API token (auto-generated token from the zBot name) and will automatically add the API token to the zBot properties file.

  • The new zBot download will automatically configure the Zephyr URL, username and password. Once the zBot is downloaded, it can be run right away.

    • If you want to manually configure the Zephyr URL, username and password, then you can edit the zBot properties file in the zBot folder to change anything that you want to. 

1. Navigate to the top-right of the interface (where your name is account name is) and click on the drop-down list to display the various options.

Image Removed

2. Click on the Download zBot button.

  • This will display a pop-up that requires you to name the zBot. Naming the zBot is beneficial as it provides you with an easy way to locate it when using the zBot with Vortex. 

Image Removed

3. Enter the name of your zBot and then click the Download button.

Image Removed

4. Once the ZIP file for the zBot is downloaded. Extract the folder and this folder will contain your pre-configured zBot.

  • From here, you can start and stop your zBot using the files included in the folder. 

Image Removed

The a Zephyr API token (auto-generated token from the zBot name) and will automatically add the API token to the zBot properties file.

Image Removed

Start the ZBot

1. Navigate to the folder where you downloaded your zBot.

Image Removed

2. Use and run the zbot_start.sh file to start the zBot.

Image Removed

Stop the ZBot

1. Navigate to the folder where you downloaded your zBot.

Image Removed

2. Use and run the zbot_stop.sh file to stop the zBot.

...

Installing a ZBot

ZBots must first be installed on the target automation system. ZBots are supported on Windows, MacOS X, Solaris and Linux.

How ZBots Execute

ZBots accept execution instructions from the Zephyr Server. These can be single automation scripts or a batch of them. For batches or groups of test scripts, they have two modes of execution: Sequential and Parallel. The ZBot updates the Zephyr Server in real-time about its progress.
 
ZBots come with an execution utility that has the following execution routine:

  • Accepts commands (i.e. the full command line path of the automation script to be executed) and launches those scripts on the command line
  • Waits for the test script to finish (only in the Sequential mode)
  • Looks at the process exit code and uses it to update execution results
  • Resets itself to accept the next set of instructions

This execution routine can be further enhanced, extended or customized to intercept this flow and can be used to performed customized actions e.g. logging, checkout from repository, perform environment checks and setup, create and remove test data etc. This is done by writing a ZIP.

What is a ZIP? Image Added

...

A ZIP or a Zephyr Interceptor Program is an extension to the execution utility of a ZBot allowing default execution flow of automation scripts to be intercepted in order to perform customized actions. ZBots comes packaged with a default ZIP which can be intercepted with a partial or full functionality customized. Currently, ZIPs written in JAVA are supported.
 
The following flow shows what the ZBot 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>

Writing a ZIP

Please refer to the Javadocs for writing a ZIP. The online version can be found here. Locally, they can be found in the <zbot_installdir>/zbot/docs

Setup a ZIP

For Windows:
To setup a custom ZIP (created as described in previous section),

  1. Copy the Artifact (either one of the following)
    1. Jar: Copy the jar file to <ZBot_installation_folder>\lib. Modify <ZBot_installation_folder>\conf\wrapper.conf, add following entry
      wrapper.java.classpath.6=..\lib\<your_jar_file_name>
    2. Class: Copy the entire package containing the class file to <ZBot_installation_folder>\plugin.
  2. Update property file: right click on the ZBot and select Edit Properties. This will open zbot.properties in Notepad. Add/Edit following property
    scriptLauncher=<fully_qualified_class_name_of_new_interceptor_program>
  3. Restart ZBot


For Linux/Solaris:
To setup a custom ZIP (created as described in previous section),

  1. Copy the Artifact (either one of the following)
    1. Jar: Copy the jar file to <ZBot_installation_folder>/lib. Modify <ZBot_installation_folder>/conf/wrapper.conf, add following entry
      wrapper.java.classpath.6=../lib/<your_jar_file_name>
    2. Class: Copy the entire package containing the class file to <ZBot_installation_folder>/plugin.
  2. Update property file: Go to <ZBot_installation_folder>/conf/ and open zbot.properties in vi. Add/Edit following property
    scriptLauncher=<fully_qualified_class_name_of_new_interceptor_program>
  3. Restart ZBot


Note

Please use the same version of Zephyr and ZBots, as mixing and matching versions is not supported

For more details, go to developer.yourzephyr.com

Learn about how you can build ZBots and ZIPs with your application. Check out the tools, sample scripts, detailed documentation and share with a community of like-minded developers.