-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Spec::JUnitFormatter enhancements #8599
Spec::JUnitFormatter enhancements #8599
Conversation
67ea6ad
to
c4694d6
Compare
d711cb1
to
5769c3f
Compare
8f3e179
to
143351e
Compare
143351e
to
89c1093
Compare
5627fe4
to
028bd33
Compare
Sorry for the ongoing changes, fwiw this is ready for review. |
Thank you! |
c42781c
to
62b6723
Compare
Last commit should fix #8617 (comment) - and it does :) |
Additional commit is to help fixing #8617 (comment) - without it, we'd need to aggregate xml files from all of the runs into a single directory, whereas with |
20b9bf0
to
97cb7b4
Compare
As far as I can tell, |
@RX14 no, why? Lines 132 to 139 in 97cb7b4
crystal/src/spec/junit_formatter.cr Lines 37 to 41 in 97cb7b4
just to confirm that passing directory will blow things up as it should: File.new(Path["."], "w") # => raises Errno (Error opening file '.' with mode 'w': Is a directory) |
oh, right, it's the old code which hardcoded I'd rather change the semantics of the existing option. It's stupid as it is. |
I was thinking the same, addressed in the last commit. |
96d0ecd
to
d7090c0
Compare
d7090c0
to
078ce1d
Compare
I'm having second thoughts on the following change
I checked other tools at the usual configuration is specifying a directory. As it was before. It seems that this change was motivated to grab the result of the splitted output of the std_specs, if so I would prefer to revert this part of the change and use different directories for the parts. Am I missing something @Sija ? |
What other tools you have in mind? Also, it as @RX14 already mentioned, it doesn't make much sense to take only directory as an argument. Why won't users be allowed to name they files as they wish? |
I would prefer to have another cli option to indicate file (or file pattern) to be used within the output directory. The file pattern could be used to split results based , but scope creep. This idea does not necesesarily requires a new option, but then at least what I want is that if the path option does not end up with |
If we're going to revert behaviur i'd at least want an explanation for why these other tools do this. Are we ever going to emit multiple files? What's the benefit. |
Splitting files is useful for reporting purposes. If the spec is used for acceptance test and they are grouped doing different files per group my help. Or it can be splitted by test result status directly. Or by namespace. I can't say why other tools work like that. But I found it odd the change. And i discover becure the CircleCI test result integration broke on nightly on some projects. If the path does not ends with .xml it should behave as before. The previous behaviour wasn't broken. |
<error type="...">
attribute<testcase name="...">
attributepending
testcases asskipped
skipped
testcases (frompending
)<testcase classname="...">
is now built from relative path (toDir.current
)—junit_output
flag to take full path to the junit xml file, instead of just a directory