Skip to content
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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

isabelrios
Copy link
Collaborator

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

__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':
Copy link
Collaborator Author

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)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be removed

@@ -22,7 +22,8 @@
'issue-regression',
'jira-qa-requests',
'jira-qa-needed',
'bugzilla-qe-verify'
'bugzilla-qe-verify',
'milestones'
Copy link
Collaborator Author

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

@@ -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
Copy link
Collaborator Author

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:
Copy link
Collaborator Author

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.

@isabelrios
Copy link
Collaborator Author

isabelrios commented Dec 17, 2024

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:

Screenshot 2024-12-17 at 13 12 33

From here, I have created a new view in Staging, report_milestone, that I will connect to Looker to start experimenting with the graphs.

@isabelrios isabelrios marked this pull request as ready for review January 14, 2025 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant