Zephyr Exporter

Zephyr Exporter is a tool used for exporting test execution results into Jira Zephyr Plugin.

Features:

  • Create test executions

  • Set test execution statuses

JIRA Configuration

The exporter requires configuration of JIRA instance to work with.

To configure connector to JIRA instance use jira. prefix followed by arbitrary sequence of alphanumerical characters that determine unique JIRA instance key and followed by the properties listed in the following table:

The properties marked with bold are mandatory.
Property Name Description

project-key-regex

The regular expression to match JIRA project keys.

endpoint

The JIRA Endpoint.

any of general, authentication or SSL handshake properties

The HTTP properties.

fields-mapping

The mapping between human-readable fields used by VIVIDUS and fields used by JIRA.

Example 1. jira.properties
jira.vividus.project-key-regex=(VIVIDUS|VSCODE|REACTAPP)
jira.vividus.endpoint=https://vividusframework.atlassian.net/
jira.vividus.http.auth.username=admin
jira.vividus.http.auth.password=5401a7d27b291c5d
jira.vividus.http.socket-timeout=10000
jira.vividus.fields-mapping.test-case-type=customfield_10002

In the example above the vividus is a key that can be used to refer this JIRA instance.

Zephyr Export Properties

Property Required Description

zephyr.exporter.jira-instance-key

false

The key of the configured JIRA instance, in case of missing value it will be evaluated automatically based on issue keys being exported

zephyr.exporter.source-directory

true

Path to directory with test execution JSON results.

zephyr.exporter.update-execution-statuses-only

false

Property for update existing executions statuses only.

zephyr.exporter.statuses-of-test-cases-to-add-to-execution

false

List of test case statuses for adding to execution.

zephyr.project-key

true

Key of a Jira project where new test executions should be created

zephyr.version-name

true

Version/release name where new test executions should be created

zephyr.cycle-name

true

Cycle/sprint name where new test executions should be created

zephyr.folder-name

false

Folder name where new test executions should be created

Zephyr Execution Status Mapping

The Zephyr plugin for Jira has own configurable execution statuses. testExecutionStatus endpoint is used to get the detailed information about the statuses, like: https://jira.example.com/rest/zapi/latest/util/testExecutionStatus. The following properties are used to setup a mapping between Vividus and Zephyr execution statuses.

Vividus execution status property name Zephyr execution status value (by default)

zephyr.statuses.FAILED

FAILED

zephyr.statuses.BROKEN

TEST NEEDS REWORK

zephyr.statuses.PENDING

TEST NEEDS REWORK

zephyr.statuses.UNKNOWN

PASSED WITH REMARKS

zephyr.statuses.SKIPPED

SCHEDULED

zephyr.statuses.PASSED

PASSED

Authentication

  • If the authentication through basic schema is available on your JIRA instance use jira.<jira instance key placeholder>.http.auth.username and jira.<jira instance key placeholder>.http.auth.password properties, both properties must be set.

    jira.<jira instance key placeholder>.http.auth.username=admin
    jira.<jira instance key placeholder>.http.auth.password=5401a7d27b291c5d
  • In case of two-factor authentication or any other complex authentication process it’s possible to set session cookies into request headers like the following example shows (jira.<jira instance key placeholder>.http.auth.username and jira.<jira instance key placeholder>.http.auth.password properties must be empty in this case).

    jira.<jira instance key placeholder>.http.headers.Cookie=SESSIONID=298zf09hf012fh2

Scenario Meta Attributes

Name Example Description

testCaseId

@testCaseId TEST-1

Add test execution to Jira test case

Example of scenario for export

Example 2. Test.story
Scenario: Buy an item
Meta:
    @layout desktop chrome_phone
    @testCaseId TEST-1; TEST-2; TEST-3

Given I am on a page with the URL '${vividus-test-site-url}/delayedScroll.html'
When I click on element located `By.id(anchor)`
When I wait until scroll is finished
Then page is scrolled to element located `id(toClick)`

Export

  • Go to the corresponding GitHub Packages repository

  • Find the link with name vividus-to-zephyr-exporter-0.4.8.jar

  • Click the link and download the exporter JAR-file

  • Create a new file with name application.properties and put all necessary properties there

  • Run the following command replacing <jar-file name> with the name of the JAR-file downloaded previously

java -jar <jar-file name> -Dspring.config.location=classpath:/application.properties,./application.properties