rotest-reportportal

Rotest result handler to send data to a ReportPortal system


Keywords
testing, system, reportportal, unittest
License
MIT
Install
pip install rotest-reportportal==2.0.1

Documentation

rotest_reportportal

PyPI https://travis-ci.org/gregoil/rotest_reportportal.svg?branch=master AppVeyor https://coveralls.io/repos/github/gregoil/rotest_reportportal/badge.svg?branch=master

What is it?

A plugin to the Rotest testing framework, that enables reporting the test results to the amazing Report Portal system.

Installation

Install it using pip:

$ pip install rotest_reportportal

Configuration

In the rotest.yml configuration file (or any of the available configuration formats, like .rotest.yaml) add the following entry:

rotest:
    <rotest configuration>

reportportal:
    endpoint: http://<reportportal_host>:<port>
    project: <project name>

For example:

rotest:
    ...

reportportal:
    endpoint: http://reportal:8080/
    project: SUPERADMIN_PERSONAL

In addition to that, you need to define the ROTEST_REPORTPORTAL_TOKEN environment variable a user's UUID. For example:

$ export ROTEST_REPORTPORTAL_TOKEN="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
$ # or, on Windows:
$ set ROTEST_REPORTPORTAL_TOKEN="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

A couple of things about the UUID:

  • You can obtain it from your user profile: http://{report_portal}:{port}/ui/#user-profile
  • Tests published with this UUID will identify the user that ran those tests.
  • Unless you want everyone to be able to publish results for you, keep this UUID a secret (no mentioning in the repository's code or any public space).

Usage

You can run tests and activate the result handler, in the following way:

$ python <some_test_file> -o reportportal