Testify converts XCTest output into a proper structure (JSON, JUNIT, MD), or it'll miserably fail. 😉
You can use the command line utility to convert test results into JSON, JUNIT and MD on the fly.
git clone https://github.com/BinaryBirds/Testify.git && cd Testify
make install
which testify
In your project folder run:
- for JSON format:
swift test | testify json
- for JUNIT format:
swift test | testify junit
- for MD format:
swift test | testify md
You can just use the Swift Package Manager as usual:
.package(url: "https://github.com/binarybirds/testify", from: "1.1.1"),
import Testify
let suite = TestSuite.parse("test-output-string")