Let's say the following describes your situation:
- You're using JaCoCo to measure code coverage for a Java/Kotlin project (eg an Android app), a perfectly good tool for the job that unfortunately does not generate JSON reports.
- You're using a 3rd party SaaS provider like CircleCI, which can sometimes perform unpredictably when uploading large amounts of files to build artifact storage. Things like HTML coverage reports from JaCoCo, for instance.
- As a result you'd like to zip the HTML report prior to saving it to artifacts but would still like the high-level coverage stats to be made transparent without having to download and unzip the HTML report.
If you're in this boat along with me, here is one way you might go about extracting this infromation from the html report.
The risk here is that this is theoretically brittle - it's tied to whatever the DOM happens to be for the HTML that JaCoCo generates. In reality, it hasn't changed in quite some time. YMMV.