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

Broken image link using -d option when merged xcresults by xcrun #203

Closed
SatoTakeshiX opened this issue May 2, 2021 · 1 comment
Closed
Labels

Comments

@SatoTakeshiX
Copy link
Contributor

When merged xcresult by xcrun and using -d option, XCTestHTMLReport output broken image links.

Xcode version : 12.4
iOS version: iOS 14.4 
xchtmlreport version: 2.1.0

The Reproduction Steps

I ran the test on two iOS devices.iPhone 8 iOS 14.4 and iPod touch iOS 14.4.

xcodebuild test -project XCTestHTMLReportSampleApp.xcodeproj \
    -scheme XCTestHTMLReportSampleApp \
    -destination 'id=<iPhone8 and iPodTouch ids>’ \
    -resultBundlePath ./ResultBundle.xcresult

I named the xcresult of iPhone 8 is ResultBundle_iphone8.xcresult, and iPod touch is ResultBundle_iPodtouch.xcresult.

Then I merged the two xcresults with xcrun.

xcrun xcresulttool merge ResultBundle_iphone8.xcresult ResultBundle_iPodtouch.xcresult --output-path merged_report.xcresult

Then use xchtmlreport to create index.html.

$ xchtmlreport -r XCTestHTMLReportSampleApp/merged_report.xcresult -d -v                                                     
XCTestHTMLReport 2.1.0

Parsing XCTestHTMLReportSampleApp/merged_report.xcresult
  ▸ Parsing ActionRunDestinationRecord
  ▸ Parsing ActionDeviceRecord
  ▸ Parsing ActionRunDestinationRecord
  ▸ Parsing ActionDeviceRecord

Building HTML..
  ▸ Writing report to /Users/satoutakeshi/local_product/Personal-Factory/Try/XCTestHTMLReport/XCTestHTMLReportSampleApp/index.html

Report successfully created at /Users/satoutakeshi/local_product/Personal-Factory/Try/XCTestHTMLReport/XCTestHTMLReportSampleApp/index.html
  ▸ Deleting unattached files..
  ▸ Deleted 921 unattached files

Then I found the broken image links.

image

The investigated file was stored in this googole drive.

https://drive.google.com/file/d/1g_c7Vr1bR8YjNjWcbi8rH6GPiOkhYC_T/view?usp=sharing

  • ResultBundle_iPodtouch.xcresult
  • ResultBundle_iphone8.xcresult
  • merged_report_before_d.xcresult
    • the xcresult before running -d option
  • merged_report_after_d.xcresult
    • the xcresult after running -d option
  • index.html

thank you

takeshi

@nacho4d
Copy link
Member

nacho4d commented Oct 7, 2021

PR was merged, Closing this thanks to Takeshi!

剛士さん対応をありがとうございました! クローズしちゃいますね!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants