Flutter-intellij: Cannot visualize lcov coverage data

Created on 8 Feb 2017  路  7Comments  路  Source: flutter/flutter-intellij

The flutter test --coverage command produces an coverage/lcov.info file that contains information about the line coverage of your tests. We should be able to visualize that information in IntelliJ.

  1. When editing a file, you should be able to see whether a line was (a) executed in a test, (b) possible to execute but not actually executed, (c) not actually possible to execute. (All this data is in the lcov file.)

  2. There should be some sort of overview panel that lists the various files in the project and what percent line coverage they have. Also, there should be an overall readout for the percent coverage of the whole project.

For example, the lcov-info plugin does this for Atom. It's likely that such a plugin already exists for IntelliJ. We might simply need to find it and recommend.

Most helpful comment

/cc @devoncarew

Running into this while trying to visualize coverage in a pending PR.

All 7 comments

See https://github.com/angular/angular-cli/issues/3560#issuecomment-270141272 for possible inspiration.

IntelliJ already supports "Run with coverage" for Dart
and renders executed code with different background colors
and also shows coverage percentage besides each file in the Project window.
Would be great to have that in Flutter.

A small limitation in the IntelliJ Dart coverage support is, that it doesn't support pub test, but only pub run, this means there needs to be a test/all_tests.dart file that imports all ..._test.dart files and calls their main()

I was able to visualize with this in VS Code https://github.com/ryanluker/vscode-coverage-gutters

It's a shame this feature is not available for flutter, in spite of plain dart being supported for a long time now.

/cc @devoncarew

Running into this while trying to visualize coverage in a pending PR.

There is a coverage option in Android Studio and IntelliJ that I usually use that will add for each line the information of the lcov file. That works amazingly good in react and other JS libraries.

grafik

Does someone knows where to begin, I would love to take a look at how to implement that solution?

is there any update on on a coverage visualization plugin for Flutter?

Was this page helpful?
0 / 5 - 0 ratings