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

Add subresults support for reportportal report plugin #3331

Draft
wants to merge 14 commits into
base: feature/reportportal-improvements
Choose a base branch
from

Conversation

seberm
Copy link
Collaborator

@seberm seberm commented Oct 30, 2024

This PR adds support for tmt subresults for tmt reportportal plugin. It tries to map the subresults as child items of parent test result in a specific launch.

Please don't review this PR while it is marked as a draft.

More info:

TODOs:

  • Find a way to map the subresults to parent test/step reportportal launch items
  • Should the import of subresults be optional via argument? Or via fmf test metadata proposed by @kkaarreell ? What should be the default behavior?
  • Try to resolve status:interrupted issues for subresults in RP, why is this happening?

Blocked by:

Related:

Pull Request Checklist

  • implement the feature
  • write the documentation
  • extend the test coverage
  • update the specification
  • adjust plugin docstring
  • modify the json schema
  • mention the version
  • include a release note

@seberm seberm added step | report Stuff related to the report step plugin | reportportal The reportportal report plugin labels Oct 30, 2024
@seberm seberm force-pushed the feature/reportportal-subresults branch from 1e50f45 to 757da3f Compare October 30, 2024 17:49
@seberm seberm force-pushed the feature/reportportal-subresults branch from 757da3f to 11d5bc3 Compare October 30, 2024 17:54
@seberm seberm force-pushed the feature/reportportal-subresults branch 2 times, most recently from 0014f19 to 0fb5d3f Compare November 5, 2024 17:51
@seberm seberm force-pushed the feature/reportportal-subresults branch from 0fb5d3f to a6da49f Compare November 12, 2024 11:19
@seberm seberm changed the base branch from main to feature/reportportal-improvements November 12, 2024 11:52
@seberm seberm force-pushed the feature/reportportal-subresults branch from a6da49f to 3b7b5a4 Compare November 12, 2024 11:52
@seberm seberm added the status | blocked The merging of PR is blocked on some other issue label Nov 12, 2024
@seberm seberm force-pushed the feature/reportportal-improvements branch from b2f5688 to c1518ce Compare November 12, 2024 15:50
@seberm seberm force-pushed the feature/reportportal-subresults branch 3 times, most recently from 0d383fb to bdb49f9 Compare November 14, 2024 16:33
@kkaarreell
Copy link
Collaborator

I think it might be handy to control subresults import on a per test level through test fmf metadata.

@seberm
Copy link
Collaborator Author

seberm commented Nov 19, 2024

These are just some screenshots from my testing.

BTW: @kkaarreell Do you have any idea why the subresult items have the status:interrupted tag assigned to them? I still can't figure out why is this happening.

Launch overview (parent tmt results):

01-Screenshot 2024-11-19 at 12-56-28 Report Portal

Beakerlib test detail (subresults / child test items):

02-Screenshot 2024-11-19 at 12-57-08 Report Portal-bkrlib-subresults

Details of shell test subresults when calling tmt-report-result command multiple times:

03-Screenshot 2024-11-19 at 12-57-37 Report Portal-tmt-report-result-subresults

@kkaarreell
Copy link
Collaborator

I have tested the current code but it doesn't work (at least) for beakerlib tests. There are no logs for individual test phases (I am not even sure if beakerlib even produces them at all) and therefore there is nothing RP AA could work with or a reviewer look at when reviewing a particular failed phase. One can access logs for the whole test but because subresults are imported one can't assign a test result for a whole test as it needs to be done for individual phases. As a result, this feature is not usable ATM. As a precaution, phase reporting should be enabled only for tests that provide individual phase logs.

@seberm
Copy link
Collaborator Author

seberm commented Nov 20, 2024

Hello @kkaarreell,
thanks for your testing and input!

I have tested the current code but it doesn't work (at least) for beakerlib tests. There are no logs for individual test phases (I am not even sure if beakerlib even produces them at all) and therefore there is nothing RP AA could work with or a reviewer look at when reviewing a particular failed phase.

I am aware the logs for subresults are not imported. I was troubleshooting this yesterday and the problem why the shell subresults (created by tmt-report-result -o <logfile> ...) and also beakerlib phases (see below) are not there should be fixed by this PR:

Regarding the logs for beakerlib subresults/phases, we want them, for sure. I was troubleshooting why the phase logs are not saved by tmt-report-result script. I've described the reason in this PR:

One can access logs for the whole test but because subresults are imported one can't assign a test result for a whole test as it needs to be done for individual phases. As a result, this feature is not usable ATM. As a precaution, phase reporting should be enabled only for tests that provide individual phase logs.

If I understand this correctly, if we always provide logs for ReportPortal child items (beakerlib phases and logs reported by calling tmt-report-result), we are fine and everything is nice and shiny. Right?

With both PRs (#3370, #3372) applied, the result is following:

Parent beakerlib result detail:

01-Screenshot 2024-11-20 at 14-06-07 Report Portal-parent-view

Parent beakerlib result logs:

02-Screenshot 2024-11-20 at 14-08-05 Report Portal-parent-logs

Subresult logs (setup phase):

03-Screenshot 2024-11-20 at 14-08-36 Report Portal-setup-subresult-logs

Subresult logs (myfail phase):

04-Screenshot 2024-11-20 at 14-09-26 Report Portal-myfail-subresult-logs

@kkaarreell
Copy link
Collaborator

On the last screenshot there is a test phase failure but the error log is missing.

@psss psss added this to the 1.40 milestone Nov 21, 2024
@seberm seberm force-pushed the feature/reportportal-improvements branch from f19af6c to d3fbee8 Compare November 22, 2024 15:34
@seberm seberm force-pushed the feature/reportportal-subresults branch from ba94e41 to c8d1ec9 Compare November 22, 2024 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin | reportportal The reportportal report plugin status | blocked The merging of PR is blocked on some other issue step | report Stuff related to the report step
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants