Code Coverage

Note

Code Coverage reporting and analysis are in beta. Contact us at support@solanolabs.com for more information.

Solano CI integrates with your existing rcov and simplecov configurations to provide code coverage metrics for your test suite. If you use one of these tools, you’ll see the aggregate coverage for your session reported in the Results Summary and an HTML report in the logs section at the bottom of the report page.

To enable coverage collection, add the following to your config/solano.yml:

---
coverage:
  version: 2
  enabled: true

Solano CI also supports a “coverage ratchet”. When the ratchet is enabled, the session will be marked as a failure if code coverage falls below the configured threshold, even if all the tests pass.

---
coverage:
  version: 2
  enabled: true
  ratchet: 80

Adding the above incantation to your config/solano.yml will cause the session to fail if coverage falls below 80%.

Original Beta

If you are using the original beta of code coverage with a solano.yml like:

---
coverage: true

Change it to the following to use the new system:

---
coverage:
  version: 2
  enabled: true