Testing in Flutter

Sep 19 2023 · Dart 2.19.3, Flutter 3.7.6, Android Studio 2021.3.1, Visual Studio Code 1.7.4

Part 6: Generate Coverage Report

19. Generate Code Coverage Report

Episode complete

Play next episode

Next
About this episode
Leave a rating/review
See forum comments
Cinema mode Mark complete Download course materials
Previous episode: 18. Add Custom Fonts to Goldens Next episode: 20. Add Test Case for Missed Code

Get immediate access to this and 4,000+ other videos and books.

Take your career further with a Kodeco Personal Plan. With unlimited access to over 40+ books and 4,000+ professional videos in a single subscription, it's simply the best investment you can make in your development career.

Learn more Already a subscriber? Sign in.

Heads up... You’re accessing parts of this content for free, with some sections shown as obfuscated text.

Heads up... You’re accessing parts of this content for free, with some sections shown as obfuscated text.

Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan.

Unlock now

In the previous videos, we learned about unit tests, widgets tests, integration tests, and generating goldens. We also wrote a lot of tests. But if I ask, how much of our code is covered by the test? We don’t have an answer to that.

flutter test --coverage
brew install lcov
lcov --capture --directory ./coverage --output-file lcov.info
genhtml ./coverage/lcov.info --output-directory ./coverage/html