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

Pat/Finished TR exercise #537

Closed
wants to merge 1 commit into from
Closed

Pat/Finished TR exercise #537

wants to merge 1 commit into from

Conversation

whlpatricia
Copy link
Collaborator

Relevant Links

https://docs.google.com/document/d/1hnjxKxmwybFElFmJjixM2mkiI1cADsLHvLbXy4e09qE/edit?tab=t.0

Description of Code / Doc Changes

Made script for updating custom fields.

Process Changes Required

Mark the relevant boxes:

  • Adds a dependency (rerun pipenv install)
  • Changes the BasePage
  • Changes or creates a BOM/POM (name the object model): _
  • Changes CI flow
  • Changes scheduled Beta or DevEdition
  • Changes Git hooks or Github settings
  • Changes L10n harness

Screenshots or Explanations

If you need to explain your code, do it here.

Comments or Future Work

Do we need to start another PR soon to address something you saw while working on this?

Workflow Checklist

  • Please request reviewers
  • If this is an unblocker, please post in Slack.
  • If asked to address comments, please resolve conversations.
  • If asked to change code, please re-request review from the person who wanted changes.

Thank you!

# Loop through all the test cases in the target suite
for case in tr._get_test_cases(17, suite["id"])["cases"]:
# Check if the custom automated field is set to see if we automated it
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.

I don't think that this is exactly how we want to check whether a case has been automated, but it might work? If you comment out the updater line below and print which cases this would update, what do you get?

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 would get all the test cases, so a big big chunk of tests

# Check if the custom automated field is set to see if we automated it
if case["custom_automated_test_names"]:
logging.info(f"Updating test case {case['id']} coverage status for full")
tr.update_case_field(case['id'], "custom_automation_coverage", FULL_COVERAGE_VALUE)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Comment this out and write a line that prints all the case numbers you would be updating, if it looks good I'll give the go-ahead

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Here is a screenshot:
image

Copy link
Collaborator

Choose a reason for hiding this comment

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

Looks good, run the script!

@ben-c-at-moz
Copy link
Collaborator

Script was run successfully

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