Skip to content

Commit f998bd0

Browse files
committed
Add readme file
1 parent 8726f1f commit f998bd0

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed

README.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
#ReportPortal python client
2+
3+
[![PyPI](https://img.shields.io/pypi/v/reportportal-client.svg?maxAge=2592000)](https://pypi.python.org/pypi/reportportal-client)
4+
5+
Library used only for implementors of custom listeners for ReportPortal
6+
7+
## Allready implemented listeners:
8+
* Robot Framework (link)
9+
10+
11+
## Installation
12+
13+
The latest stable version is available on PyPI:
14+
15+
pip install reportportal-client
16+
17+
18+
## Usage
19+
20+
Main classes are:
21+
22+
- reportportal_client.ReportPortalService
23+
- reportportal_client.StartLaunchRQ
24+
- reportportal_client.StartTestItemRQ
25+
- reportportal_client.FinishTestItemRQ
26+
- reportportal_client.FinishExecutionRQ
27+
- reportportal_client.SaveLogRQ
28+
29+
Basic usage example:
30+
31+
```python
32+
from time import time
33+
from reportportal_client import (ReportPortalService,
34+
FinishExecutionRQ,
35+
StartLaunchRQ, StartTestItemRQ,
36+
FinishTestItemRQ, SaveLogRQ)
37+
38+
def timestamp():
39+
return str(int(time() * 1000))
40+
41+
endpoint = "https://urlpreportportal"
42+
project = "ProjectName"
43+
token = "uuid" #you can get it from profile page in ReportPortal
44+
launch_name = "name for launch"
45+
launch_doc = "Some text documentation for launch"
46+
47+
service = ReportPortalService(endpoint=endpoint,
48+
project=project,
49+
token=uuid)
50+
51+
#Start Launch
52+
sl_rq = StartLaunchRQ(name=launch_name,
53+
start_time=timestamp(),
54+
description=launch_doc)
55+
r = service.start_launch(sl_rq)
56+
launch_id = r.id
57+
58+
#Finish Launch
59+
fl_rq = FinishExecutionRQ(end_time=timestamp(),
60+
status="PASSED")
61+
service.finish_launch(launch_id, fl_rq)
62+
```
63+
64+
# Copyright Notice
65+
Licensed under the [GPLv3](https://www.gnu.org/licenses/quick-guide-gplv3.html)
66+
license (see the LICENSE file).

0 commit comments

Comments
 (0)