Skip to content

Code coverage is collected for dependencies that include the name of the app in their names #5721

@jamesdhutton

Description

@jamesdhutton

When I click "run tests with coverage" in VS Code, the resulting coverage pane shows coverage for some (apparently random) flutter library files, instead of for my code. See screenshot below.

If I run flutter test --coverage on the command line, then I get a lcov.info file which correctly reports coverage for my code, so this isn't a general issue with code coverage for my project; the issue is specific to the VS Code coverage facility in the dart/flutter extensions.

As far as I know my flutter project is totally vanilla. I'm running v3.118 of the dart/flutter extensions and v1.104.1 of VS Code.

Screenshot of the coverage pane. The 3 files displayed are library files, not my code. Why it picks these 3 particular library files I do not know.
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    in coverageRelates to collecting code coverage when running Dart/Flutter testsin testingRelates to test execution of Dart/Flutter tests for end usersis bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions