Currently collate_test_result_bundles creates a directory which is not in .xcresult format. Many of us use XCTestHTMLReport tool which presents result in html format that is similar to Xcode. That tool requires xcresult format. So I and am pretty sure many others would like the final bundle in xcresult format.
What I observed with merging xcresult format is that it does not omit duplicate tests, tests that failed earlier but passed in later run. However when using test_center plugin the final results does not have any duplicate results which indicates you are probably handling that case. So this new action would ideally merge bundles in .xcresult format.
This feature would be a new action, that would require directory with all the xcresult files and output path of final result file. Something similar to below,
UI.important(
'example: ' \
'collate the .xcresult bundles to "result.xcresult"'
)
bundles = Dir['../spec/fixtures/*.xcresult'].map { |relpath| File.absolute_path(relpath) }
collate_xcresult_bundles(
bundles: bundles,
collated_bundle: File.join(<output dir>, 'result.xcresult')
)
Tried bunch of things nothing worked.
@jineshqa thank you for the idea. To clarify, are you suggesting two things here?
collate_xcresults action that does what it says.output_types to get those. So, I _think_ the action already has that?Also, as you know, my time is extremely limited. If you're open to working on this, I can give you guidance. Here is a rough idea of what would have to be done:
collate_xcresults action. collate_test_result_bundles may be a good model for that.output_types to include xctest.reportname_helper to update xctest result file names.report_collator to also collate xcresult files.@jineshqa: on Friday, I'll update this Issue to just be a request to create a collate_xcresults action unless I hear otherwise before then. Thanks.
@jineshqa thank you for the idea. To clarify, are you suggesting two things here?
- A new
collate_xcresultsaction that does what it says.- Something that generates the HTML, junit, and json result files? One only has to pass the desired
output_typesto get those. So, I _think_ the action already has that?
Hi @lyndsey-ferguson,
Yes, we need a new action that does not change the format of merged xcresult files as that is required to generate html in the Xcode format. Also, same action should be able to output result file in desired format based on parameters passed.
So if my input is,
firstrun.xcresult
secondrun.xcresult
and I call this new action as described in feature request above the output would be
result.xcresult
result.json (Duplicate test results are removed)
result.xml (Duplicate test results are removed)
result.html (Duplicate test results are removed)
@jineshqa I don't see how a new action that collates xcresult files should generate json, html, and xml files. These don't seem to be the same thing.
_Maybe_ 3 other actions that convert the xcresult file into json, xml, and html files, but that would be a stretch that I would not prioritize for myself.
I received the email asking how junit files are merged. I use the action that is part of this plugin: collate_junit_reports
I realized that after hitting submit and immediately deleted it but too late I guess :-)
Feel free to close this ticket. I am using trainer from fastlane to generate individual xml from each xcresult file and then merge them using collate_junit_reports.
I'll keep this open as the collate_xcresults action is a good idea.
Completed with v3.9.0
Most helpful comment
I'll keep this open as the
collate_xcresultsaction is a good idea.