Using Kaleidoscope with XCTest Failures
Kaleidoscope 3.1.3 and later can show
XCTest
failures in that format for you! No further trick or conversion is needed. Kaleidoscope parses the incoming content and automatically splits it into A and B parts, so the exact differences can be seen instantly.
You can drag and drop from Xcode’s issues navigator to Kaleidoscope’s Dock icon.
Xcode goes to great lengths to provide specialized previews for user interface code, playgrounds, etc., but its tools for viewing unit test output are so primitive. I’ve long used a wrapper for XCTAssertEqual
that prints the expected and actual values on separate lines, so that at least they line up and you can more easily see the differences. It can also optionally diff
them to help find the interesting lines. This Kaleidoscope feature goes further by highlighting differences within a line.