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
Fix #20139: Surface Acceptance Test results in a more convenient location #20171
base: develop
Are you sure you want to change the base?
Conversation
Hi @rahat2134, can you complete the following:
|
Assigning @StephenYu2018 for the first pass review of this PR. Thanks! |
@agallop PTAL. |
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.
A couple of concerns.
@@ -349,3 +350,17 @@ def test_start_tests_for_long_lived_process(self) -> None: | |||
with self.swap_mock_set_constants_to_default: | |||
with self.swap(constants, 'EMULATOR_MODE', True): | |||
run_acceptance_tests.main(args=['--suite', 'testSuite']) | |||
|
|||
def test_print_test_output(self) -> None: |
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.
Please include the result of printing test output in the test name
@@ -1,4 +1,4 @@ | |||
# Copyright 2023 The Oppia Authors. All Rights Reserved. | |||
# Copyright 2024 The Oppia Authors. All Rights Reserved. |
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.
Thanks for this! :)
…nce-Test_Result
…/oppia into Acceptance-Test_Result
correcting the failing backend tests. |
@agallop PTAL. |
@@ -392,8 +392,12 @@ jobs: | |||
run: python -m scripts.build --prod_env | |||
- name: Run Desktop Acceptance Test ${{ matrix.suite }} | |||
run: xvfb-run -a --server-args="-screen 0, 1285x1000x24" python -m scripts.run_acceptance_tests --skip-build --suite=${{ matrix.suite }} --prod_env |
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.
Can you add a flag for this new behavior and set it here?
@@ -177,6 +194,9 @@ def main(args: Optional[List[str]] = None) -> None: | |||
with servers.managed_portserver(): | |||
_, return_code = run_tests(parsed_args) | |||
|
|||
with open('test_output.log', 'r', encoding='utf-8') as output_file: |
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.
The test output is being printed a second time here and that's not necessary.
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.
Thanks Rahat! Some more comments
@@ -99,6 +99,21 @@ def compile_test_ts_files() -> None: | |||
os.path.join(build_dir_path, 'images')) | |||
|
|||
|
|||
def print_test_output(output_lines: List[bytes]) -> None: |
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 do think this is all very complex. You can just print all the lines.
In the event of a failure, I don't think this will print the call stack as well. Which we would want to see as it tells you where and why the test failed.
@@ -392,8 +392,12 @@ jobs: | |||
run: python -m scripts.build --prod_env | |||
- name: Run Desktop Acceptance Test ${{ matrix.suite }} | |||
run: xvfb-run -a --server-args="-screen 0, 1285x1000x24" python -m scripts.run_acceptance_tests --skip-build --suite=${{ matrix.suite }} --prod_env | |||
- name: Display Desktop Test Output |
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.
Display Desktop Acceptance Test Output
- name: Run Mobile Acceptance Test ${{ matrix.suite }} | ||
run: xvfb-run -a --server-args="-screen 0, 1285x1000x24" python -m scripts.run_acceptance_tests --skip-build --suite=${{ matrix.suite }} --prod_env --mobile | ||
- name: Display Mobile Test Output |
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.
Display Mobile Acceptance Test Output
Unassigning @agallop since the review is done. |
Hi @rahat2134, it looks like some changes were requested on this pull request by @agallop. PTAL. Thanks! |
Hi @rahat2134, I'm going to mark this PR as stale because it hasn't had any updates for 7 days. If no further activity occurs within 4 days, it will be automatically closed so that others can take up the issue. |
Hi @rahat2134, I'm going to mark this PR as stale because it hasn't had any updates for 7 days. If no further activity occurs within 4 days, it will be automatically closed so that others can take up the issue. |
Overview
Essential Checklist
Please follow the instructions for making a code change.
Proof that changes are correct
PR Pointers