Swiftpack.co - Package - TitouanVanBelle/XCTestHTMLReport
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.

:warning: Looking for collaborators to maintain XCTestHTMLReport: Drop me a line :warning:


What is it?

Xcode-like HTML report for Unit and UI Tests



  • Supports parallel testing
  • Supports attachments:
    • .png
    • .jpeg
    • .txt
    • .log
    • .mp4
  • Navigate through the report with the keyboard's arrow keys
  • Filter out successful or failed tests
  • Displays information about the target device
  • Displays activity logs
  • Junit report

Fastlane Support




Install via Homebrew.

# Install latest stable version
$ brew install https://raw.githubusercontent.com/TitouanVanBelle/XCTestHTMLReport/develop/xchtmlreport.rb

# Install latest master branch
$ brew install --HEAD https://raw.githubusercontent.com/TitouanVanBelle/XCTestHTMLReport/develop/xchtmlreport.rb


Simply execute the following command to download the latest version of XCTestHTMLReport

$ bash <(curl -s https://raw.githubusercontent.com/TitouanVanBelle/XCTestHTMLReport/master/install.sh)

You can also specify a branch or tag

$ bash <(curl -s https://raw.githubusercontent.com/TitouanVanBelle/XCTestHTMLReport/master/install.sh) '1.0.0'


Run your UI tests using xcodebuild without forgetting to specify the resultBundlePath

$ xcodebuild test -workspace XCTestHTMLReport.xcworkspace -scheme XCTestHTMLReportSampleApp -destination 'platform=iOS Simulator,name=iPhone 7,OS=11.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 -r TestResults

Report successfully created at ./index.html

Multiple Result Bundle Path

You can also pass multiple times the -r option.

$ xchtmlreport -r TestResults1 -r 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 -r TestResults1 -j

Report successfully created at .index.html

JUnit report successfully created at TestResults1.xcresult/report.junit


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.


XCTestHTMLReport is available under the MIT license.


Stars: 468


2.1.0 - 2020-11-06T16:13:39

Changes since 2.0.0 (compare):

New features:

  • Support video and log file attachments #181
  • Added image resizing, attachment cleanup and screenshot flows #168
  • Implement "Skipped" tests, improve Junit report #172
  • Make it possible to inline assets into the resulting index.html #148

Bug fixes:

  • Google chrome scrolling not working for large file #160
  • Update XCResultKit to 0.5.7 fixing #166 #169
  • Support path with spaces #165
  • Fix crash in XCResultKit: XCResultKit updated #157
  • Fix Homebrew for 2.0.0 release #144


  • Bump nokogiri from 1.10.4 to 1.10.8 #167
  • Bump nokogiri from 1.8.5 to 1.10.4 #140

2.0.0 - 2019-10-22T14:30:54

1.7.0 - 2019-04-02T13:28:06

1.6.1 - 2018-05-29T06:54:41

  • Fixed: version number #76
  • Fixed: wrong screenshot paths for secondary reports #79

1.6.0 - 2018-05-20T18:29:54


  • Added Homebrew formula (#55)
  • Added JUnit XML reports (-j) (#62)
  • Added success/failure icon next to device name (#59)


  • Improved device list HTML (#61)
  • Fixed warning when extracting activity logs (#52)
  • Fixed issues on Firefox (#52)
  • Fixed screenshots not loading for secondary reports (#70)
  • Fixed other minor issues (#58)

1.5.0 - 2018-04-10T06:56:18


  • Support for passing multiple result directories with the -r option (#47)
  • Added total number of tests, number of failed tests and number of succeeded tests (#46)
  • Activities containing a failure are written in red (#44)

1.4.0 - 2017-12-23T09:28:24


  • Fully supports Unit Test targets
  • Supports multiple test targets per run (#41)
  • Supports HTML attachements (#32)
  • Added 'Report an issue' link (#26)


  • Impossible to search in report (#37)
  • Impossible to copy text in report (#36)

1.3.0 - 2017-11-27T09:59:07


  • Supports parallel testing (#28)

1.2.0 - 2017-08-02T07:28:27


  • Support .jpeg attachments (#14)
  • Hide test summary groups when all their test are hidden when filtering (#16)
  • Print version of xchtmlreport when using it (#20)
  • Added total amount of test in the test summary group item (#21)

1.1.0 - 2017-07-28T12:16:16


  • Left column is also resizable allowing you to see the device identifier and other truncated information entirely (#1)
  • Verbose mode for the command line prints more logs (#2)
  • Help mode for the command line print the usage and available options (#3)
  • Test and activity durations are written in the format hms (#4)
  • Possibility to navigate through the report with the arrow keys of the keyboard (#8)

XCUITestHTMLReport is out! - 2017-07-26T12:18:31


  • Displays information about the device used to run the tests
    • Name
    • iOS Version
    • Model
    • Identifier
  • Supports automatic screenshots
  • Supports Xcode 9's attachements
    • Text
    • Image
  • Displays the activity logs