xcsummary
xcsummary copied to clipboard
macOS command line tool to parse xcbodebuild test results and generate html output with activity screenshots.
xcsummary
is a macOS command line tool that parses xcbodebuild
test results and generates html output with activity screenshots. We use it as a part of our CI Server and find it very useful and helpful. We'd like to share it.
- Installation
- Usage
- Example
- Output
- Inspiration
- Links
- Contribution
Installation
Open terminal and do the following:
- Clone the project.
git clone https://github.com/MacPaw/xcsummary.git
- Navigate to source folder
cd xcsummary
- Copy binary to the folder you prefer. For example /usr/local/bin/
cp build/xcsummary /usr/local/bin/xcsummary
Usage
As easy as pie:
xcsummary -in <path to Summary.plist> -out <path to result.html>
Optional -show_success argument can be used to expand green test cases as well.
Example
Tip: we use -resultBundlePath
parameter in xcodebuild to know the exact location for every single build.
#Run your test as usual
xcodebuild test -workspace YourProject.xcworkspace -scheme YourProjectScheme -resultBundlePath '<path_to_results>'
#Here we suggest to browse <path_to_results> folder to check the folders structure.
#... and generate the report
xcsummary -in <path_to_results>/1_Test/action_TestSummaries.plist -out ~/Desktop/result.html
Screenshots
Output
Inspiration
xcsummary is completely inspired by xcpretty, we really love it and use it. But since xcpretty has some issues with screenshots collection, we decided to create our own one :)
Links
Great article to understand Test Logs in Xcode
Contribution
Feel free to open issues and pull requests.