Behave JIRA XRAY results uploader
Project description
behave-xray
Installation
$ pip install -U behave-xray
or from the source:
$ python setup.py install
Usage
Add JIRA tags to Gherkin scenario:
# --FILE: tutorial.feature
@jira.test_plan('JIRA-3')
Feature: showing off behave
Feature's description
@jira.testcase('JIRA-1')
Scenario: run a simple test
Given we have behave installed
When we implement a test
Then behave will test it for us!
@jira.testcase('JIRA-2')
Scenario Outline: Add two numbers in Calc
Given Calculator is open
When I add <a> and <b>
Then result is <result>
Examples: Sum
| a | b | result |
| 3 | 4 | 7 |
| 6 | 10 | 18 |
This library also supports the feature files exported from Xray Cucumber tests:
Feature: showing off behave
Feature's description
@TEST_JIRA-1
Scenario: run a simple test
Given we have behave installed
When we implement a test
Then behave will test it for us!
@TEST_JIRA-2
Scenario Outline: Add two numbers in Calc
Given Calculator is open
When I add <a> and <b>
Then result is <result>
Examples: Sum
| a | b | result |
| 3 | 4 | 7 |
| 6 | 10 | 18 |
Configure Jira URL and authentication
Set Jira server API base URL in system environments:
$ export XRAY_API_BASE_URL=<jira URL>
Set system environments for basic authentication:
$ export XRAY_API_USER=<jria username>
$ export XRAY_API_PASSWORD=<user password>
Set system environments for Personal Access Tokens authentication:
$ export XRAY_TOKEN=<Xray token>
Set system environments for Could server authentication with Client ID and Client Secret:
$ export XRAY_CLIENT_ID=<Xray client id>
$ export XRAY_CLIENT_SECRET=<Xray client secret>
Run tests
Run tests against Jira Xray Server+DC:
$ behave -f behave_xray:XrayFormatter
Run tests against Jira Xray Cloud server:
$ behave -f behave_xray:XrayCloudFormatter
You can register formatter in behave.ini
:
# -- FILE: behave.ini
[behave.formatters]
xray = behave_xray:XrayCloudFormatter
and use with shorter name:
$ behave --f xray
Customize report
Add summary to a report:
$ behave -f behave_xray:XrayCloudFormatter -D xray.summary='Report generated by behave'
or from behave.ini
file:
# -- FILE: behave.ini
[behave.userdata]
xray.summary = Report generated by behave
Available options:
xray.summary
xray.user
xray.version
xray.revision
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Hashes for behave_xray-0.1.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 014dab461a6bbeafa12c5a249130225138695f77d75103f21944b42a2d61eba2 |
|
MD5 | e6d8daec5c22b067cbeb5712763fa36b |
|
BLAKE2b-256 | e1fd379c84aacc1172d92cdb1af7d3a0dc355ba1f4f1b7dd1e28a2efaa4c2eb7 |