-
Notifications
You must be signed in to change notification settings - Fork 371
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
Conversation
Codecov Report
@@ 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: |
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.
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() |
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.
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 |
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.
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
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.
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.
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.
added
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.