Skip to main content

Behave JIRA XRAY results uploader

Project description

behave-xray

PyPi Build Status codecov

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     |

Set system environments (Basic authentication) for Xray Server+DC:

$ export XRAY_API_BASE_URL=<jira URL>
$ export XRAY_API_USER=<jria username>
$ export XRAY_API_PASSWORD=<user password>

Run tests:

$ behave -f behave_xray:XrayFormatter

Set system environments (Bearer authentication) for Xray Cloud:

$ export XRAY_API_BASE_URL=<jira URL>
$ export XRAY_CLIENT_ID=<Xray client id>
$ export XRAY_CLIENT_SECRET=<Xray client secret>

Run tests:

$ 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

behave_xray-0.1.4-py3-none-any.whl (12.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page