Remove duplicate counting of test results in Consolelogger #2267
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Current behavior:
Recognizing parent result as passed ,failed or skipped and adding to respective counts.By this we are showing duplicate count.
ex:
Scenario:
if we have a parent test result(passed) and two child test results in which one is passed and the other is failed.
current behavior:
total test =3
passed tests =1
Failed =2
expected behavior:
total tests =2
passed tests =1
failed tests =1
Approach :
Storing every result and it's outcome in dictionary. if it is recognized as parent then removing it from dictionary. By this way we end up with the dictionary that has non parent results and it's outcome. Finally counting the passed,failed, skipped and total in the resulting dictionary will give the expected behavior mentioned above
Assumed parent test result comes first and then the child test result comes.
Related issue
Kindly link any related issues. E.g. Fixes #xyz.