File tree Expand file tree Collapse file tree 4 files changed +18
-4
lines changed
robotframework_reportportal Expand file tree Collapse file tree 4 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,8 @@ REQUIRED:
51
51
```
52
52
NOT REQUIRED:
53
53
```
54
+ --variable RP_LAUNCH_UUID:"id_of_existing_rp_launch"
55
+ - ID of existing Report Portal launch
54
56
--variable RP_LAUNCH_DOC:"some_documentation_for_launch"
55
57
- Description for the launch
56
58
--variable RP_LAUNCH_TAGS:"RF Smoke"
Original file line number Diff line number Diff line change 9
9
items = []
10
10
11
11
12
+ def start_launch (launch ):
13
+ """Start a new launch at the Report Portal."""
14
+ if not Variables .launch_id :
15
+ launch .doc = Variables .launch_doc
16
+ logging .debug ("ReportPortal - Start Launch: {0}" .format (
17
+ launch .attributes ))
18
+ RobotService .start_launch (launch_name = Variables .launch_name ,
19
+ launch = launch )
20
+ else :
21
+ RobotService .rp .launch_id = Variables .launch_id
22
+
23
+
12
24
def start_suite (name , attributes ):
13
25
suite = Suite (attributes = attributes )
14
26
if suite .robot_id == "s1" :
15
27
Variables .check_variables ()
16
28
RobotService .init_service (Variables .endpoint , Variables .project ,
17
29
Variables .uuid )
18
- suite .doc = Variables .launch_doc
19
- logging .debug ("ReportPortal - Start Launch: {0}" .format (attributes ))
20
- RobotService .start_launch (launch_name = Variables .launch_name ,
21
- launch = suite )
30
+ start_launch (suite )
22
31
if not suite .suites :
23
32
attributes ['id' ] = "s1-s1"
24
33
start_suite (name , attributes )
Original file line number Diff line number Diff line change 6
6
class Suite (object ):
7
7
def __init__ (self , attributes ):
8
8
super (Suite , self ).__init__ ()
9
+ self .attributes = attributes
9
10
self .suites = attributes ["suites" ]
10
11
self .tests = attributes ["tests" ]
11
12
self .doc = attributes ["doc" ]
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ class Variables(object):
15
15
launch_doc = None
16
16
log_batch_size = None
17
17
launch_tags = None
18
+ launch_id = None
18
19
19
20
@staticmethod
20
21
def check_variables ():
@@ -38,6 +39,7 @@ def check_variables():
38
39
raise RobotServiceException (
39
40
"Missing parameter RP_PROJECT for robot run\n "
40
41
"You should pass -v RP_PROJECT:<project_name_value>" )
42
+ Variables .launch_id = get_variable ("RP_LAUNCH_UUID" , default = None )
41
43
Variables .launch_doc = get_variable ("RP_LAUNCH_DOC" , default = None )
42
44
Variables .launch_tags = get_variable ("RP_LAUNCH_TAGS" , default = "" ).split (" " )
43
45
Variables .log_batch_size = int (get_variable ("RP_LOG_BATCH_SIZE" , default = "20" ))
You can’t perform that action at this time.
0 commit comments