-
Notifications
You must be signed in to change notification settings - Fork 1
/
run_report.py
24 lines (19 loc) · 955 Bytes
/
run_report.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env python
import datetime
import time
from pylarion.test_run import TestRun
from pylarion.work_item import TestCase, Requirement
from pylarion.document import Document
from config import *
from helpers import *
# Test runs execution status per team
g = gapi.GoogleSpreadSheetAPI(SPREADSHEET_NAME, "Polarion test run")
# Test runs execution status per plan and run properties
row_number = 3
for curr in field_dicts_list:
g.update_sheet(row_number,5, find_number_of_TCs_per_status_and_run_fields(run_fields_dict=field_dicts[curr], status=PLANNED))
g.update_sheet(row_number,6, find_number_of_TCs_per_status_and_run_fields(run_fields_dict=field_dicts[curr], status=PASSED))
g.update_sheet(row_number,7, find_number_of_TCs_per_status_and_run_fields(run_fields_dict=field_dicts[curr], status=NOT_RUN))
row_number += 1
now = datetime.datetime.now()
g.update_sheet(50, 1, 'Last update: ' + now.strftime("%Y-%m-%d %H:%M"))