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.
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
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.
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
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 :)
Great article to understand Test Logs in Xcode
Feel free to open issues and pull requests.