BirmacherAkos / bitrise-step-xctest-html-report

Bitrise CLI step for generating Xcode-like HTML report for Unit and UI Tests with XCTestHTMLReport
MIT License
0 stars 3 forks source link

Test HTML isn't looked up in the right place #11

Closed abarisain closed 4 years ago

abarisain commented 5 years ago

Hello,

Recently, this step has started to fail for me.

Here are the logs:

XCTestHTMLReport 2.0.0
Warning: Can't find test reference for action Build "Batch"
Report successfully created at /var/folders/6q/wgy6jtp12w5gzgm9lzcglpqw0000gn/T/XCUITestOutput128236326/index.html
JUnit report successfully created at /var/folders/6q/wgy6jtp12w5gzgm9lzcglpqw0000gn/T/XCUITestOutput128236326/Test.xcresult/report.junit
Html and JUnit reports successfully generated
Exporting generated reports
XC_HTML_REPORT => /Users/vagrant/deploy/index.html
XC_JUNIT_REPORT => /Users/vagrant/deploy/report.junit
Errors during the step:
HTML report does not exists in: /var/folders/6q/wgy6jtp12w5gzgm9lzcglpqw0000gn/T/XCUITestOutput128236326/Test.xcresult/index.html
Failed to open file, error: open /var/folders/6q/wgy6jtp12w5gzgm9lzcglpqw0000gn/T/XCUITestOutput128236326/Test.xcresult/index.html: no such file or directory
Failed to copy file, error: invalid argument
Failed to close file, error: invalid argument

as you can see, XCTestHTMLReport generates the report at the root of the output, and the junit in a subfolder.

Unfortunately this steps looks for the html into the xcresult folder, and it does not exist there. This upstream issue complains about where the html is put: https://github.com/TitouanVanBelle/XCTestHTMLReport/issues/146

This ends up creating a 0 byte html file, which breaks bitrise's artifact uploading.

BirmacherAkos commented 5 years ago

Hi @abarisain,

Thanks for the issue report, I was able to reproduce it with the 2.0.0 version of XCTestHTMLReport. I will check it and try to fix it ASAP ( probably next week 😄 )

BirmacherAkos commented 5 years ago

Hi @abarisain,

I've released a new version 0.2.0 which should fix the issue. The release is still waiting to be approved https://github.com/bitrise-io/bitrise-steplib/pull/2267, until then you can lock the step on the master branch by changing in the bitrise.yml:

- xctest-html-report@0.1.3:

to

- git::https://github.com/BirmacherAkos/bitrise-step-xctest-html-report.git@master:
abarisain commented 5 years ago

Perfect!

I'll wait for the official approval, thank you for the fast fix 👏