RobotFramework ReportPortal Integration

raw JSON →
5.7.0 verified Mon Apr 27 auth: no python

Agent for reporting RobotFramework test results to ReportPortal. Current version 5.7.0. Released regularly, aligned with the ReportPortal client library updates.

pip install robotframework-reportportal
error ImportError: cannot import name 'ReportPortalListener' from 'robotframework_reportportal'
cause Using wrong import path or outdated package version.
fix
Ensure you have installed the latest version: pip install robotframework-reportportal. Then use: from robotframework_reportportal import ReportPortalListener
error ModuleNotFoundError: No module named 'robotframework'
cause robotframework is no longer a dependency starting from 5.7.0.
fix
Install robotframework explicitly: pip install robotframework
error ConfigurationError: 'RP_UUID' is not a valid configuration parameter
cause RP_UUID support was removed in 5.6.5.
fix
Use RP_API_KEY instead. Example: export RP_API_KEY='your-api-key'
breaking Python 3.8 support removed in version 5.7.0. Upgrade to Python 3.9+.
fix Use Python 3.9 or later.
breaking robotframework dependency removed in 5.7.0 to avoid supply chain attack. Your project must have robotframework installed separately.
fix Add robotframework to your project dependencies explicitly: pip install robotframework.
deprecated RP_UUID parameter is no longer supported since 5.6.5. Use RP_API_KEY instead.
fix Replace RP_UUID with RP_API_KEY environment variable.

Configure and use the ReportPortal listener with environment variables.

import os
from robotframework_reportportal import ReportPortalListener

# Configure via environment variables
os.environ['RP_ENDPOINT'] = 'https://your-instance.reportportal.io'
os.environ['RP_API_KEY'] = 'your-api-key'
os.environ['RP_PROJECT'] = 'your-project'
os.environ['RP_LAUNCH'] = 'RobotFramework Launch'
os.environ['RP_LAUNCH_ATTRIBUTES'] = 'platform:linux version:1.0'

# In RobotFramework output.xml, the listener is specified in --listener option
# Example command:
# robot --listener robotframework_reportportal.ReportPortalListener tests/

print('Listener configured. Run: robot --listener robotframework_reportportal.ReportPortalListener tests/')