Creating Listeners in ScriptRunner for Zephyr Scale Events

The following steps illustrate how to create listeners in ScriptRunner for Zephyr Scale events.

Example scenarios and scripts are outlined below.

Note

You must have, at minimum, ScriptRunner version 5.6.8.1 installed to use the Zephyr Scale events/integration.

Review the ScriptRunner API options.

Begin this task in ScriptRunner for Jira.

  1. Go to Settings > Manage Apps > Listeners > Create Listener.

    A list of available listeners appears.

  2. Click Custom Listener.

    The Custom Listener template appears.

  3. Complete the following fields:

    • Project(s) - Select the project or projects for which you want to create the listener.

    • Events - Select one or more of the available Zephyr Scale events (TestExecutionChangedEvent, TestCaseChangedEvent, and/or TestCycleChangedEvent).

    • Inline Script - Add your script to the text box. You can copy/paste pre-made scripts from the Adaptavist Library, too.

      ScriptRunner event listeners server

      Click the image to enlarge it.

  4. Click Add.

    The listener is created.

After you create a listener, the integration is complete.

At any point, you can return to ScriptRunner’s Listeners section and view the executed listener actions.

Example scenarios and scripts

Here are some example scripts using Zephyr Scale events and Java APIs.

Zephyr Scale Scenario

ScriptRunner Action

Example Script

When a test execution is updated, I want to…

Transition any linked Jira issues/bugs to the proper status so my team knows which bugs are ready for retesting and which stories can be released.

See the script on the Adaptavist Library.

When a test case is updated, I want to…

Transition any linked Jira issues to the proper status so my team knows if the requirement is covered or not.

See the script on the Adaptavist Library.

When a test cycle is completed, I want to…

Update any linked Jira issues so that I can see the progress without viewing the test cycle.

See the script on the Adaptavist Library.

Tip

Did you know that you can use listeners in ScriptRunner to send emails and/or Slack notifications when a Zephyr Scale event occurs? For example, you can notify team members when a test case is approved, when a test cycle is completed, or when a test execution passes/fails. Sometimes it’s the small things that make a big impact.

See Also

Publication date: