[feat] Extend the JUnit report - #3702
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #3702 +/- ##
===========================================
+ Coverage 91.93% 91.97% +0.04%
===========================================
Files 62 62
Lines 13786 13802 +16
===========================================
+ Hits 12674 12695 +21
+ Misses 1112 1107 -5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
vkarak
left a comment
There was a problem hiding this comment.
I'm not very much in favor of a JUnit report diverging from the JSON report in the information it provides. The JSON report should contain this information and JUnit report should simply use it.
I'm working already on updating the information reported in the the JSON report so I could include this in an upcoming PR. Also it's safer to use a byte threshold for tailing instead of just the lines.
| def _tail_file(filename, num_lines): | ||
| try: | ||
| with open(filename, encoding='utf-8', errors='replace') as fp: | ||
| return ''.join(fp.readlines()[-num_lines:]) | ||
| except OSError: | ||
| return '' |
There was a problem hiding this comment.
This is not needed: you can use the osext.tail() function.
This PR is adding extra information to the element of JUnit report. In particular, it adds the following text information:
Use case: get useful information quickly while browsing the test matrix in the gitlab UI.