-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Milestones to Testrail pipeline #50
base: master
Are you sure you want to change the base?
Conversation
__main__.py
Outdated
@@ -46,7 +46,8 @@ def parse_args(cmdln_args): | |||
def validate_project(platform, project, report_type): | |||
# Conditionally require --platform and --project | |||
# if --report-type is 'test-case-coverage' | |||
if report_type == 'test-case-coverage': | |||
# if report_type == 'test-case-coverage': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: I will remove this line
@@ -84,6 +84,7 @@ def __send_request(self, method, uri, data): | |||
while True: | |||
response = requests.get(f"{url}&limit={limit}&offset={offset}", headers=headers) | |||
data = response.json() | |||
print(data) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be removed
utils/constants.py
Outdated
@@ -22,7 +22,8 @@ | |||
'issue-regression', | |||
'jira-qa-requests', | |||
'jira-qa-needed', | |||
'bugzilla-qe-verify' | |||
'bugzilla-qe-verify', | |||
'milestones' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I may rename this as testrail-milestones for consistency
utils/datetime_utils.py
Outdated
@@ -15,8 +15,11 @@ def convert_datetime_to_epoch(str_date): | |||
return int(t) | |||
|
|||
def convert_epoch_to_datetime(int_epoch_date): | |||
ts = datetime.fromtimestamp(int_epoch_date) | |||
return ts.strftime(format_date) | |||
if int_epoch_date == '' or int_epoch_date == 0 or int_epoch_date == 'NaN': # noqa |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was not needed in the end, so I will undo these changes
import re | ||
|
||
|
||
class PayloadUtils: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have created this new class to extract data from the payload, the description field in test rail and create new colummns with the data we will be interested in.
This screenshot (missing some columns like milestone_id for space) shows how this is working from running the script, inserting data in the database (I have created a new table: report_milestones) and showing it in BigQuery: From here, I have created a new view in Staging, report_milestone, that I will connect to Looker to start experimenting with the graphs. |
With this PR we are adding milestone data to Testrail pipline.
Still WIP to finalize the code. In addition, a new table is needed in the database