Setting Up Test Coverage

Adding test coverage reporting really completes the picture of your codebase’s health by displaying your test coverage data in the context of your static analysis results. In our previous article, we saw how our GitHub browser extension allows you to view coverage line-by-line. Once you’ve set up test coverage reporting you can also

  • view test coverage reports for each class alongside quality metrics like complexity, duplication, and churn,
  • toggle between viewing code smells and test coverage line-by-line in the same source listings, and
  • track your team’s test coverage in your weekly summary emails and on your Code Climate dashboard.

We accept test coverage data from virtually any location, including locally run tests or your continuous integration (CI) service. We also have a few different test reporters including:

GitHub project
General Instructions
Travis-specific Instructions

For additional details about setting up test coverage, test coverage metrics, excluding files and directories from your payloads, and troubleshooting, check out our guide to Setting Up Test Coverage.

Now that you’ve customized your analysis and got a clear picture of the health of your repo, it’s time to let your team in on the action. Next up, we'll look at best practices for rolling Code Climate out to your team.

Setting Up Test Coverage