Agent for Reproting results of tests to the Report Portal server
Project description
Important: this is draft version under development.
Pytest plugin for reporting test results of Pytest to the ‘Reportal Portal’.
Usage
Installation
To install pytest plugin execute next command in a terminal:
pip install pytest-reportportal
Configuration
Prepare the config file pytest.ini in root directory of tests or specify
any one using pytest command line option:
py.test -c config.cfg
The pytest.ini file should have next mandatory fields:
rp_uuid- number could be found in the User profile sectionrp_project- name of project in Report Potalrp_endpoint- address of Report Portal Server
Example of pytest.ini:
[pytest]
rp_uuid = fb586627-32be-47dd-93c1-678873458a5f
rp_endpoint = http://192.168.1.10:8080
rp_project = user_personal
rp_launch_tags = 'PyTest' 'Smoke'
Also launch tags could be added, but this parapmeter is not
mandatory rp_launch_tags = 'PyTest' 'Report_Portal'.
Logging
For logging of the test item flow to Report Portal, please, use the python logging handler privided by plugin like bellow:
# Import Report Portal handler in the test module.
from pytest_reportportal import RPlogHandler
# Get logger.
logger = logging.getLogger()
# Create hanler, set log level add it to the logger.
rp_handler = RPlogHandler()
rp_handler.setLevel(logging.INFO)
logger.addHandler(rp_handler)
# In this case only INFO messages will be sent to the Report Portal.
def test_one(self):
logger.info("Case1. Step1")
x = "this"
logger.info("Case1. Step2")
assert 'h' in x
Launching
To run test with Report Portal you need to specify neme of launch:
py.test ./tests --rp-launch AnyLaunchName
Copyright Notice
Licensed under the GPLv3 license (see the LICENSE file).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file pytest-reportportal-0.2.3.tar.gz.
File metadata
- Download URL: pytest-reportportal-0.2.3.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c5ceba00ab9711104c2aa27ab647562128893e74d608cf019006be3512cbe6de
|
|
| MD5 |
89909c08892e0c8227e5e03f60d522e4
|
|
| BLAKE2b-256 |
f25858e1c7c4c218b939bed253ffdfe315d3c2ba1ec9534311d6f206d974cc99
|