Skip to content

Write tests to improve code coverage  #179

Open
@danielabrozzoni

Description

@danielabrozzoni

Our CI runs on master a special job called "Code coverage". The goal of this job is to calculate which lines of code are covered by our tests, and which ones aren't, and publish the result as a code coverage report. You have two ways of viewing the report:

1. On the coveralls website. Just go on https://coveralls.io/github/bitcoindevkit/bdk?branch=master

2. Download from the CI artifacts:

Go to the latest commit, click on the "Code Coverage / Code Coverage" job:

Selection_104

You then click on the job summary:

Selection_105

And you click to download the coverage-report:

Selection_106


Scroll around - you'll eventually encounter a big chunk of red code, such as:

Selection_107

Your goal is now to write a test that hits that piece of code and opening a PR. Easy* :)

  • Easy, but extremely important! The higher code coverage we have, the better tests we have, the higher the chance that we catch bugs before they slip in. Your contribution here is extremely valuable!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions