Skip to content

[feat] Extend the JUnit report - #3702

Open
toxa81 wants to merge 3 commits into
reframe-hpc:developfrom
toxa81:junit_report_v2
Open

[feat] Extend the JUnit report#3702
toxa81 wants to merge 3 commits into
reframe-hpc:developfrom
toxa81:junit_report_v2

Conversation

@toxa81

@toxa81 toxa81 commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

This PR is adding extra information to the element of JUnit report. In particular, it adds the following text information:

  • working directory
  • last 20 lines of stdout
  • last 20 lines of stderr

Use case: get useful information quickly while browsing the test matrix in the gitlab UI.

@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.97%. Comparing base (3adb203) to head (928e2aa).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@vkarak vkarak changed the title Extend the JUnit report [feat] Extend the JUnit report Jul 20, 2026
@vkarak
vkarak self-requested a review July 20, 2026 21:10
@vkarak vkarak added prio: normal enhancement reporting Issues related to reporting and processing the test results labels Jul 20, 2026
@vkarak vkarak modified the milestone: ReFrame 4.11 Jul 20, 2026

@vkarak vkarak left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Comment on lines +175 to +180
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 ''

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is not needed: you can use the osext.tail() function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement prio: normal reporting Issues related to reporting and processing the test results

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants