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

vs/testrail-api-ex #542

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

vs/testrail-api-ex #542

wants to merge 1 commit into from

Conversation

vsangereanMOZ
Copy link
Collaborator

Testrail task exercise

val = tr._get_test_cases(PROJECT_ID, suite_id)
if val["size"] < val["limit"]:
matching_cases = [
case for case in val["cases"] if case["custom_automated_test_names"]
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is an interesting way to check if automation is done. Let's see if it works!

matching_case_ids = [case["id"] for case in matching_cases]

if DRY_RUN:
logging.info(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Alright, run a dry run and post the ids of the cases you would have updated here. If they look good, I'll give you the go-ahead to run the script live. Thanks!

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 still have some issues with this. I will handle it ASAP.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Have you dealt with these issues?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

2025-04-08 10:20:11,390 - INFO - TestRail Base URL: https://mozilla.testrail.io
2025-04-08 10:20:11,390 - INFO - Fetching suite IDs for suites: ['Printing', 'Startup and Profile', 'Reader View']
2025-04-08 10:20:12,368 - INFO - Suite IDs to process: [73, 2119, 2126]
2025-04-08 10:20:14,092 - INFO - Suite 73 has 2 completed automated case(s).
2025-04-08 10:20:15,273 - INFO - Suite 2119 has 1 completed automated case(s).
2025-04-08 10:20:16,211 - INFO - Suite 2126 has 3 completed automated case(s).
2025-04-08 10:20:16,211 - INFO - Total completed automated cases found: 6
2025-04-08 10:20:16,211 - INFO - [DRY RUN] Would update case 965139 → custom_automation_coverage = 3
2025-04-08 10:20:16,211 - INFO - [DRY RUN] Would update case 965142 → custom_automation_coverage = 3
2025-04-08 10:20:16,211 - INFO - [DRY RUN] Would update case 130792 → custom_automation_coverage = 3
2025-04-08 10:20:16,211 - INFO - [DRY RUN] Would update case 130908 → custom_automation_coverage = 3
2025-04-08 10:20:16,211 - INFO - [DRY RUN] Would update case 130912 → custom_automation_coverage = 3
2025-04-08 10:20:16,211 - INFO - [DRY RUN] Would update case 130919 → custom_automation_coverage = 3

Process finished with exit code 0

THis is what I currently have. Is this ok?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yep, that looks good, go ahead and run the script!

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.

2 participants