-
Notifications
You must be signed in to change notification settings - Fork 331
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
plugins.xunit: Use job-dir-name as name #2922
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
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.
Where should I see this in Jenkins' display of the xunit result?
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.
Well it's in the xml results, Jenkins knows about it and it shows it at least when you open the individual result:
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.
(First image shows just results, second and third shows test-results where you can see the
(from job-2018-11-30..)
which without this PR is just(from avocado)
.)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.
Ahh. Yes. I see. I have to click the test result link from the testReport/ url. I typically save the forward (clicking the test links) and back action by just clicking the those big plus (and minus) sign expander/collapsers. Apart from that new (from jobs YYYY-MM-DDTHH.MM-UUID) I didn't see anything that the cost of clicking links (and having to go back) was worth.
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.
Yeah, I know, my aim was more towards automation and having this useful info in the results itself. Anyway you can always propose adding this field to main Jenkins summary, especially if you combine results from multiple jobs.
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.
Anyway looking at junit reference: https://github.com/windyroad/JUnit-Schema/blob/master/JUnit.xsd there is no other way unless we want to inject it into stdout/stderr/name/classname/message/traceback. As Jenkins is our primary target for xunit and it only provides the testsuite-name buried deeply in results, we might consider extending these. Ideal would be the
classname
, but I'm not sure about the consequences (it'd better differentiate the test results for multiple jobs while it'd avoid grouping the results in case we want group multiple-job-results together).What I mean:
avocado run suite.yaml --some-setting
avocado run suite.yaml --other-setting
would show individual results for each avocado execution while now it groups the same tests from both executions into a single classname.
Actually when I started I wanted to use classname as jobname, because it was more natural, but when I looked at other tools they like grouping results per classname. It's a tough call...
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 mean in java testing I understand you might want to get aggregated results per failed class, but in generic testing framework like Avocado it usually doesn't make sense (and often I need to look at ExternalRunner, FailTest, ... results individually only to see regressions/improvements). When adding xunit results we simply followed the description in junit, which is classname but it could be changed.
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 mean this is what I had in mind. It doesn't follow the classname guides, but IMO it more reflects the avocado purpose:
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.
Yeah. That is nice. I can appreciate the limitations that junit puts on being able to do any of this in a nice way.