GitHub

Measuring your code coverage with Codecov

Codecov is the leading code coverage solution for CI/CD pipelines, delivering coverage metrics right into your workflow. It integrates directly with Bitrise to provide valuable insights on code quality in order to allow users to ship healthier code with less risk.
Codecov provides many features that make test coverage more available and actionable to speed up your development process and to deliver high-quality applications.

Some of these features include:

Integrating Codecov with Bitrise

In order to start using Codecov, you must be generating coverage reports with your preferred coverage tool (for example, Xcode or Gradle).

  1. Create an account on https://codecov.io.
  2. Go to repository’s Settings tab on Codecov and copy the repository upload token.

  3. Add the Codecov Step to your Workflow on Bitrise. Make sure you add the Step after the Steps that test and collect coverage.
  4. Add the Codecov upload token as a secret variable, CODECOV_TOKEN, and click Add new.
  5. Click Save and start a new build to get coverage metrics.

Additional options

The Codecov Step wraps around the Codecov bash uploader. You can add additional options in the Step listed in our arguments documentation.

Viewing your coverage reports on Codecov

To view your coverage on Codecov, you can do the following:

What next?

Now that you have code coverage reports, you can take it to the next level with the following suggestions: