-
Notifications
You must be signed in to change notification settings - Fork 9
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
Flatten testsets during report generation #104
Conversation
if depth > 0 || has_description(ts) | ||
childts.description = ts.description * "/" * childts.description | ||
end |
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.
Currently we only skip appending unnamed top-level test sets from the nested testset description. I think it would be reasonable to skip any unnamed testset at any level but didn't want to work through all of the repercussions of such a change at this time.
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.
I agree i would want to think about that a little more
CI isn't running as this doesn't use Update: Workflow has been updated to allow for PRs not based on |
Refactored the code to no longer flatten at the top-level when finishing the top-level `ReportingTestSet` and instead perform the flattening when we generate the JUnit XML report. Doing this allows introspecting of the nested `ReportingTestSet` structure and opens up the possibility of using this testset in other report generation which does support nesting.
4579913
to
bcec677
Compare
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.
LGTM
branches: | ||
- master |
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.
for my education can you explain this chagne?
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.
Was changed to address this: #104 (comment)
The branches
filter for the pull_request
event restricts this workflow such that it only runs when a PR targets master
(in this case) as the base branch. This PR originally didn't target master
but another PR so the CI wouldn't run automatically. I don't see a good reason to restrict the CI workflow in these cases so I removed this.
if depth > 0 || has_description(ts) | ||
childts.description = ts.description * "/" * childts.description | ||
end |
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.
I agree i would want to think about that a little more
Previously we would perform the testset flattening once we
finish
ed the top-levelReportingTestSet
. This PR changes the flattening to occur whenreport
is called which is where it is necessary for JUnit XML report generation. Doing this allows introspecting of the nestedReportingTestSet
structure and opens up the possibility of using this testset in other report generation which does support nesting.Additionally, the code changes here eliminates the need for
handle_top_level_results!
.