Skip to main content

ReportPortal integration client lib

Project description

Description

This library is Report Portal connector that allows you to integrate Report Portal with your Python Behave BDD testing framework

Your automation framework will run just as it does now unless you choose to run with Report Portal Integration

Installation

Manual

  1. Clone the repository
  2. Enter the folder and run pip install .

Using pip and pypi.org

TBD

Sending reports to Report Portal

In order to enable the Report Portal Integration add the -D rp_enable=True:

behave -D rp_enable=True

For step based reporting you need to also add the step based flag -D step_based=True:

behave -D rp_enable=True -D step_based=True

Integrating the lib in your framework

In your environments.py file add the service in each method. For e.g.:

def before_all(context):
    rp_enable = context.config.userdata.getbool('rp_enable', False)
    step_based = context.config.userdata.getbool('step_based', False)
    add_screenshot = context.config.userdata.getbool('add_screenshot', False)
    launch_name = f"Execution using tags: {context.config.tags.ands[0]}"
    launch_description = f"BDD Tests for: {', '.join(tag for tag in context.config.tags.ands[0])}"
    context.behave_integration_service = BehaveIntegrationService(rp_endpoint=rp_endpoint,
                                                                  rp_project=rp_project,
                                                                  rp_token=rp_token,
                                                                  rp_launch_name=launch_name,
                                                                  rp_launch_description=launch_description,
                                                                  rp_enable=rp_enable,
                                                                  step_based=step_based,
                                                                  add_screenshot=add_screenshot)
    context.behave_integration_service.launch_service(context.config.tags.ands[0])


def before_feature(context, feature):
    context.behave_integration_service.before_feature(feature)


def before_scenario(context, scenario):
    context.behave_integration_service.before_feature(scenario)


def before_step(context, step):
    context.behave_integration_service.before_step(step)


def after_step(context, step):
    context.behave_integration_service.after_step(step)


def after_scenario(context, scenario):
    context.behave_integration_service.after_scenario(scenario)


def after_feature(context, feature):
    context.behave_integration_service.after_feature(feature)


def after_all(context):
    context.behave_integration_service.after_all()

Project details


Download files

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

Source Distribution

reportportal-behave-client-1.0.0.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file reportportal-behave-client-1.0.0.tar.gz.

File metadata

  • Download URL: reportportal-behave-client-1.0.0.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.8.0 tqdm/4.32.1 CPython/3.6.5

File hashes

Hashes for reportportal-behave-client-1.0.0.tar.gz
Algorithm Hash digest
SHA256 f6591fa033ea02f331b7806bcbfb53d92b4ebace8a1eac3e96dc3d886ed52fe7
MD5 a8ee90911f810b7a349ba9d8304d7219
BLAKE2b-256 031727b3ae2dcc16226bc63feb50111b1f6ff2093fbe353839c4a9c60eed3547

See more details on using hashes here.

File details

Details for the file reportportal_behave_client-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: reportportal_behave_client-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.8.0 tqdm/4.32.1 CPython/3.6.5

File hashes

Hashes for reportportal_behave_client-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 31be98eb62654476d5498ef23e393f5704918a1af13957a807cfb220906b2bd4
MD5 73a309bc98e0eede69a4410ae70d092b
BLAKE2b-256 4ba339d3aa63117e9ea319f9d73679bd1431eabc0d2260258540ec61201bc027

See more details on using hashes here.

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