Skip to main content

ReportPortal RobotFramework agent

PyPI Python versions Build Status codecov.io Join Slack chat! stackoverflow Build with Love

Listener for RobotFramework to report results to Report Portal

Installation

First you need to install RobotFramework:

pip install robotframework

The latest stable version of library is available on PyPI:

pip install robotframework-reportportal-updated

reportportal-client and six will be installed as dependencies

IMPORTANT! The latest version does not support Report Portal versions below 5.0.0.

Specify the last one release of the client version 3 to install or update the client for other versions of Report Portal below 5.0.0:

pip install robotframework-reportportal~=3.0

Contribution

All the fixes for the agent that supports Report Portal versions below 5.0.0 should go into the v3 branch. The master branch will store the code base for the agent for Report Portal versions 5 and above.

Usage

Properties

For reporting results to Report Portal you need to pass some variables to robot run:

REQUIRED:

--listener robotframework_reportportal_updated.listener
--variable RP_API_KEY:"your_user_api_key"
--variable RP_ENDPOINT:"your_reportportal_url"
--variable RP_LAUNCH:"launch_name"
--variable RP_PROJECT:"reportportal_project_name"

NOT REQUIRED:

--variable RP_LAUNCH_UUID:"id_of_existing_rp_launch"
    - ID of existing Report Portal launch
--variable RP_LAUNCH_DOC:"some_documentation_for_launch"
    - Description for the launch
--variable RP_LAUNCH_ATTRIBUTES:"RF tag_name:tag_value"
    - Space-separated list of tags/attributes for the launch
--variable RP_TEST_ATTRIBUTES:"key1:value1 key1:value2 tag key2:value3"
    - Space-separated list of tags/attributes for the tests
--variable RP_LOG_BATCH_SIZE:"10"
    - Default value is "20", affects size of async batch log requests
--variable RP_LOG_BATCH_PAYLOAD_SIZE:"10240000"
    - Default value is "65000000", maximum payload size of async batch log
      requests
--variable RP_RERUN:"True"
    - Default is "False". Enables rerun mode for the last launch.
--variable RP_RERUN_OF:"xxxxx-xxxx-xxxx-lauch-uuid"
    - Default is "None". Enables rerun mode for the launch with the specified
      UUID. Should be used in combination with the RP_RERUN option.
--variable RP_SKIPPED_ISSUE:"True"
    - Default value is "True", marks skipped test items with 'To Investigate'
--variable RP_ATTACH_LOG:"True"
    - Default value is "False", attaches Robot Framework HTML log file to
      the launch.
--variable RP_ATTACH_REPORT:"True"
    - Default value is "False", attaches Robot Framework HTML report file to
      the launch.
--variable RP_ATTACH_XUNIT:"True"
    - Default value is "False", attaches Robot Framework XUnit result file to
      the launch.
--variable RP_VERIFY_SSL:"True"
    - Default value is "True", disables SSL verification for HTTP requests.
      Also, you can specify a full path to your certificate as the value.

Logging

Custom logger which supports attachments can be used in Python keywords. Usage of this logger is similar to the standard robot.api.logger with addition of an extra kwarg "attachment":

import subprocess
from robotframework_reportportal import logger


def log_free_memory():
    logger.debug("Collecting free memory statistics!")
    logger.debug(
        "Memory consumption report",
        attachment={
            "name": "free_memory.txt",
            "data": subprocess.check_output("free -h".split()),
            "mime": "text/plain",
        },
    )

Test case ID

It's possible to tag tests the following way test_case_id:12345 using default Robot Framework tagging functionality. ID specified after : will be sent to Report Portal.

Send attachment (screenshots)

https://github.com/reportportal/client-Python#send-attachement-screenshots

Integration with GA

Report Portal is now supporting integrations with more than 15 test frameworks simultaneously. In order to define the most popular agents and plan the team workload accordingly, we are using Google analytics.

Report Portal collects information about agent name and its version only. This information is sent to Google analytics on the launch start. Please help us to make our work effective. If you still want to switch Off Google analytics, please change env variable the way below.

export AGENT_NO_ANALYTICS=1

Licensed under the Apache 2.0 license (see the LICENSE.txt file).

Metadata

Release files for robotframework-reportportal-updated 1.1.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for robotframework-reportportal-updated 1.1.10
File Size Uploaded
robotframework-reportportal_updated-1.1.10.tar.gz 25.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for robotframework-reportportal-updated 1.1.10
File Interpreter ABI Platform
robotframework_reportportal_updated-1.1.10-py3-none-any.whl Python 3 none any Details

Total release size: 58.6 kB

Release files / robotframework-reportportal_updated-1.1.10.tar.gz

Download URL robotframework-reportportal_updated-1.1.10.tar.gz
Size 25.7 kB
Tags Source
SHA-256 checksum
How to use checksums
44bb87d67e20428eed9f298bd3fa0bddd92b83da3915d9b6d087a28762f29475
BLAKE2b-256 checksum
How to use checksums
3e76d32631f26c10975414f99b32ac9c06b750cd28191871efb7173d2296180a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release files / robotframework_reportportal_updated-1.1.10-py3-none-any.whl

Download URL robotframework_reportportal_updated-1.1.10-py3-none-any.whl
Size 32.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d545c3d749e1e78fa2f2e8fd33837a857aa5dc8a839775c0090e6257045bfbaa
BLAKE2b-256 checksum
How to use checksums
d420fd6f04340a98907f66223d480d43cf5fe4883e1ac09349e5214a46818d0a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release history Release notifications | RSS feed

This release

1.1.10 This release

2 release files

1.1.9

2 release files

1.1.8

2 release files

1.1.7

2 release files

1.1.6

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.0

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page