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

Report results for individual tests #2751

Merged
merged 2 commits into from
Feb 3, 2023
Merged

Conversation

narrieta
Copy link
Member

@narrieta narrieta commented Feb 2, 2023

Currently we report the junit results at the level of a test suite. The changes in this PR report now at the level of individual tests.

@codecov
Copy link

codecov bot commented Feb 2, 2023

Codecov Report

Merging #2751 (d1c0521) into develop (becea90) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop    #2751   +/-   ##
========================================
  Coverage    72.04%   72.04%           
========================================
  Files          104      104           
  Lines        15832    15832           
  Branches      2265     2265           
========================================
  Hits         11406    11406           
  Misses        3912     3912           
  Partials       514      514           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@@ -392,21 +399,51 @@ def _execute_test_suite(self, suite: TestSuiteDescription) -> bool:
agent_test_logger.info("\t%s", r)
agent_test_logger.info("")

if len(failed) == 0:
Copy link
Member Author

Choose a reason for hiding this comment

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

this is no longer needed. we were reporting a list of test names for failures, but now each failure would be reported individually


with _set_thread_name(suite_full_name): # The thread name is added to self._log
with set_current_thread_log(Path.home()/'logs'/f"{suite_full_name}.log"):
start_time: datetime.datetime = datetime.datetime.now()
Copy link
Member Author

Choose a reason for hiding this comment

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

removed the per-test suite result and added per-test results in the 'for test in suite.tests:' loop

else:
message.status = TestStatus.FAILED
message.message = f"Tests failed: {failed}"

except: # pylint: disable=bare-except
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we also need to add failed = True in this except block? Although it might not be necessary because the except blocks above handle this

Copy link
Member Author

Choose a reason for hiding this comment

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

ah, good catch, thanks! yes, it is needed (and important, since an exception at this level of the code may prevent some tests from running and we need to be notified about that). I'm adding it now.

Copy link
Member Author

Choose a reason for hiding this comment

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

added

@narrieta narrieta merged commit ce369ac into Azure:develop Feb 3, 2023
@narrieta narrieta deleted the test-results branch February 9, 2023 00:20
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.

None yet

3 participants