yichengchen / XCTestHTMLReport

Xcode-like HTML report for Unit and UI Tests

Home Page:http://titouanvanbelle.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

⚠️ **Looking to transfer repository ownership. Drop me a line is interested ⚠️

title

What is it?

Xcode-like HTML report for Unit and UI Tests

screenshot

Features

  • Supports parallel testing
  • Supports attachments:
    • .png
    • .jpeg
    • .heic
    • .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

https://github.com/TitouanVanBelle/fastlane-plugin-xchtmlreport

Installation

Homebrew

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

Alternate

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'

Usage

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

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.

License

XCTestHTMLReport is available under the MIT license.

About

Xcode-like HTML report for Unit and UI Tests

http://titouanvanbelle.com

License:MIT License


Languages

Language:Swift 55.8%Language:HTML 43.1%Language:Ruby 0.8%Language:Shell 0.3%