Zephyr Exporter
Zephyr Exporter is a tool used for exporting test execution results into Jira Zephyr Plugin.
Zephyr Scale
Features:
-
Create test executions
-
Set test execution statuses
-
Update statuses for existent execution
Zephyr Squad
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. |
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 |
---|---|---|
|
false |
The type of Jira API ( Zephyr Squad (formerly "Zephyr for Jira") provides base functionality for test case management easy to start, easy to use. More info Zephyr Scale (formerly "Test Management for Jira") provides advanced test case management capabilities, such as cross-project test management solution with advanced test planning, reporting, and reusability features. More info |
|
false |
The key of the configured JIRA instance, in case of missing value it will be evaluated automatically based on issue keys being exported |
|
true |
Path to directory with test execution JSON results. |
|
true |
Key of a Jira project where new test executions should be created |
|
true |
Version/release name where new test executions should be created |
|
true |
Cycle/sprint name where new test executions should be created |
|
false |
Folder name where new test executions should be created |
The following properties are applicable only for Squad |
||
|
false |
List of test case statuses for adding to execution. |
|
false |
Property for update existing executions statuses only. |
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.
This approach is similar for both API types (Scale and Squad), the major differences are Zephyr Scale has fewer test case statuses by default and the status representation during import (for Scale status transmitted in text format, like: Failed (Fail), but for Squad it transmitted in number format (status code), like: 7).
Vividus execution status property name | Zephyr Squad execution status value (by default) | Zephyr Scale execution status value |
---|---|---|
|
FAILED |
Fail |
|
TEST NEEDS REWORK |
Fail |
|
TEST NEEDS REWORK |
In Progress |
|
PASSED WITH REMARKS |
Pass |
|
SCHEDULED |
Not Executed |
|
PASSED |
Pass |
Authentication
-
If the authentication through basic schema is available on your JIRA instance use
jira.<jira instance key placeholder>.http.auth.username
andjira.<jira instance key placeholder>.http.auth.password
properties, both properties must be set. It’s also advisible to turn thepreemptive authentication
on.jira.<jira instance key placeholder>.http.auth.username=admin jira.<jira instance key placeholder>.http.auth.password=5401a7d27b291c5d jira.<jira instance key placeholder>.http.auth.preemptive-auth-enabled=true
-
In case of two-factor authentication, token authentication or any other complex authentication process it’s possible to use request headers like the following example shows:
Example 2. Authenticate using Bearer tokenjira.<jira instance key placeholder>.http.headers.Authorization=Bearer D5YY0qJDxFDOZjCEpINMTdcQQxNtATrMw/IAsyWI+CzE
Example 3. Authenticate using session cookiesjira.<jira instance key placeholder>.http.headers.Cookie=SESSIONID=298zf09hf012fh2
Both jira.<jira instance key placeholder>.http.auth.username
andjira.<jira instance key placeholder>.http.auth.password
properties must be empty in this case.
Scenario Meta Attributes
Name | Example | Description |
---|---|---|
|
|
Add test execution to Jira test case |
Example of scenario for export
Scenario: Buy an item
Meta:
@layout desktop chrome_phone
@testCaseId TEST-1; TEST-2; TEST-3
Given I am on page with 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 by `id(toClick)`
Export
-
Go to the corresponding GitHub Packages repository
-
Find the link with name
vividus-to-zephyr-exporter-0.6.3.jar
-
Click the link and download the exporter JAR-file
-
Create a new file with name
application.properties
in the same directory with the downloaded JAR-file -
Put all custom properties to the created file
-
Run the following command from the directory where the JAR-file has been downloaded, make sure to replace
<jar-file name>
placeholder with the actual name (not path) of the JAR-file including its extensionjava -jar <jar-file name> -Dspring.config.location=classpath:/application.properties,./application.properties