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 rerun test executions helper script #195

Merged
merged 11 commits into from
Sep 11, 2024

Conversation

omar-selo
Copy link
Collaborator

@omar-selo omar-selo commented Jul 30, 2024

Description

This is a script helper script for reviewers. Often when reviewing an artefact, we'd want to rerun all test executions that failed a particular test or group of tests. This handy script does just that for us as otherwise we'd have to manually go through all of the test executions in the UI which is time consuming and annoying.

$ python scripts/rerun_failing_test_executions.py -h
usage: rerun_failing_test_executions.py [-h] artefact_id test_case_regex

Reruns test executions of an artefact that failed particular test cases matched by the passed regex

positional arguments:
  artefact_id
  test_case_regex

options:
  -h, --help       show this help message and exit

Example:

  python rerun_failing_test_executions.py 47906 '.*wireless.*'
  python rerun_failing_test_executions.py 47906 '.*suspend.*'

Resolved issues

Resolves https://warthogs.atlassian.net/browse/RTW-337

Documentation

None.

Web service API changes

None.

Tests

This is a throwaway script (ideally this sort of functionality will be available through the UI eventually). But I've tried it myself a few times.

@omar-selo
Copy link
Collaborator Author

Example output:

$ python scripts/rerun_failing_test_executions.py 47225 '.*wireless.*'
will rerun dell-latitude-7350-c32372 for failing after-suspend-wireless/wireless_connection_wpa_bg_nm_wlp86s0f0
will rerun dell-unidentified-system-c32236 for failing wireless/wireless_connection_open_n_nm_wlp0s20f3
will rerun hp-eliteone-870-27-inch-g9-all-in-one-desktop-pc-c29775 for failing wireless/wireless_connection_wpa_n_nm_wlp0s20f3
will rerun hp-proone-440-238-inch-g9-all-in-one-desktop-pc-c29752 for failing after-suspend-wireless/wireless_connection_open_n_nm_wlp0s20f3
will rerun hp-proone-440-238-inch-g9-all-in-one-pc-c31581 for failing wireless/wireless_connection_open_n_nm_wlp7s0
will rerun hp-proone-440-238-inch-g9-all-in-one-pc-c31582 for failing wireless/wireless_connection_wpa_n_nm_wlp0s20f3
will rerun hp-proone-440-238-inch-g9-all-in-one-pc-c31584 for failing wireless/wireless_connection_open_n_nm_wlp0s20f3
Will rerun 7 test executions is that ok? (Y/n) Y
Submitted rerun requests

@omar-selo omar-selo force-pushed the add-rerun-test-execution-script branch 2 times, most recently from 3580810 to 75ac5fe Compare July 31, 2024 13:57
nadzyah
nadzyah previously approved these changes Sep 11, 2024
Copy link
Collaborator

@nadzyah nadzyah left a comment

Choose a reason for hiding this comment

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

Thanks for your work on this!

@omar-selo omar-selo merged commit 78fd83c into main Sep 11, 2024
2 of 3 checks passed
@omar-selo omar-selo deleted the add-rerun-test-execution-script branch September 11, 2024 08:52
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