XCTestHTMLReport
Xcode-like HTML report for Unit and UI Tests
Install / Use
npx skills add XCTestHTMLReport/XCTestHTMLReportInstalls into whichever agent you are using.
README

What is it?
Xcode-like HTML report for Unit and UI Tests

Features
- Supports parallel testing
- Supports attachments:
- .png
- .jpeg
- .heic
- .txt
- .log
- .mp4
- .gif
- Navigate through the report with the keyboard's arrow keys
- Filter out successful, failed, skipped, or mixed-result tests
- Displays information about the target device
- Displays activity logs
- Junit report(
-jflag) - Json report(
--jsonflag) - Shrink bundle size by removing unattached files
- Automatically convert heic images to browser-friendly format
- Render as a single html file with inline attachments or as a bundle
- Downsize image attachments
Installation
Homebrew (recommended)
Install via Homebrew
Install latest stable version
brew install xctesthtmlreport
Install latest from main branch
brew install xctesthtmlreport --HEAD
Mint
Install via Mint
Install latest stable version
mint install XCTestHTMLReport/XCTestHTMLReport
Install latest from main branch
mint install XCTestHTMLReport/XCTestHTMLReport@main
Usage
Run your UI tests using xcodebuild without forgetting to specify the resultBundlePath
$ xcodebuild test -workspace XCTestHTMLReport.xcworkspace -scheme SampleApp -destination 'platform=iOS Simulator,name=iPhone 14,OS=16.0' -resultBundlePath TestResults
Then use the previously downloaded xchtmlreport tool to create the HTML report. Additionally, -i flag is also available to inline all resources, this is convenient for exporting the html file standalone. HTML file will be much heavier but much more portable.
$ xchtmlreport TestResults.xcresult
Report successfully created at ./index.html
Multiple Result Bundle Path
$ xchtmlreport TestResults1 TestResults2
Report successfully created at ./index.html
This will create only one HTML Report in the path you passed with the -r option
Generate Junit Reports
You can generate junit reports with the -j flag
$ xchtmlreport -j TestResults1
Report successfully created at ./index.html
JUnit report successfully created at report.junit
Generate JSON Reports
You can generate json reports with the --json flag
$ xchtmlreport -json TestResults1
Report successfully created at ./index.html
JSON report successfully created at ./report.json
Exit codes
| Code | Meaning | | --- | --- | | 0 | No faults detected | | 1 | The report could not be written | | 3 | Report was generated but is degraded — some of the result bundle could not be fully processed | | 64 | Invalid arguments |
Starting in 3.0, xchtmlreport exits non-zero when part of a result bundle cannot
be turned into a report. Earlier versions exited 0 and printed a success message
even when parts of the report were missing, so pipelines had no way to detect an
incomplete report.
Exit 0 means no faults were detected, which is not yet the same as a guaranteed complete report: some XCResultKit decode failures are not surfaced as faults today and are still only visible as messages on stderr. See #378 and the follow-on work it tracks.
Exit 1 covers failures to write the output — for example -o pointing at a
directory that does not exist.
The report is still written when faults occur. To restore the pre-3.0 behaviour and
always exit 0 on faults, pass --lenient. --lenient does not affect exit 1 or 64.
Fastlane Support
https://github.com/TitouanVanBelle/fastlane-plugin-xchtmlreport
Contribution
Please create an issue whenever you find an issue or think a feature could be a good addition to XCTestHTMLReport. Always make sure to follow the Contributing Guidelines. Feel free to take a shot at these issues.
Special Thanks
Thank you to the original author of this tool, TitouanVanBelle! 🥳🎉
License
XCTestHTMLReport is available under the MIT license.
Related Skills
node-connect
385.6kDiagnose OpenClaw Android, iOS, or macOS node pairing, QR/setup code, route, auth, and connection failures.
blender-python-addon
40.5kBlender Python add-on rules for operators, panels, properties, registration, testing, and API-safe scripting
flutter-development-guidelines-cursorrules-prompt-file
40.5kCursor rules for Flutter development with MVVM architecture, Riverpod state management, Material widgets, and Dart style guidelines.
commit-push-pr
140.7kCommit, push, and open a PR
