Skip to content

Investigate changing branch to line code coverage #1709

@SteveMacenski

Description

@SteveMacenski

The OSRF Quality level 1 target for coverage of 90% is line coverage not branch coverage.

Currently, our test coverage is branch coverage, which is why it looks very low (well, its definitely not 90% either). Many functions in the C++ standard library can throw exceptions when used incorrectly. Those exceptions stop lines which are functionally covered in all branches of the code to show up as only partially covered because we would have to trigger every single exception possible for every single line (dozens if not hundreds).

We have main() functions with no branching statements with < 30% coverage because rclcpp::init can throw exceptions, vector push_back can throw exceptions, even string additions.

I'd love a PR to change branch coverage to line coverage to analyze the results and help make a final call about which we should be tracking.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions