Skip to main content
2 of 3
added 387 characters in body
Derek F
  • 64.1k
  • 15
  • 55
  • 104

Deployments used to emit coverage data, but that changed in some recent-ish version.

To get coverage/failed test information now, you need to add the --verbose flag

If you're using the --json flag to output results as JSON, the coverage information is contained in result -> details -> runTestResult -> codeCoverage. The "numLocations" gives you the total number of coverable lines for a class, and the "numLocationsNotCovered" gives you the number of lines not covered.

You'll need to calculate the percentage yourself (1 - uncovered/total)

Derek F
  • 64.1k
  • 15
  • 55
  • 104