Lcov On Windows

Stuck on windows developing Flutter apps and no way to get a html graphical report on code coverage? Let me fix that with a damn easy way to get the lcov set of perl scripts installed on windows and get your code coverage html report in seconds.
Pre-Requirements
You will be using the MS Windows Chocolatey package manager to install the windows port of lcov, install page at:
In your terminal you will type this to install it:
choco install lcov
That will install two things, the strawberry perl distribution and the lcov set of perl scripts. Than set your GENTHML variable to where the genthml perl script of lcov is at which is typically this location:
C:\ProgramData\chocolatey\lib\lcov\tools\bin\genhtml
And, that is it and we are ready to generate some html reports!
Code Coverage HTML Reports
You already did this command in your terminal:
flutter test --coverage
and that gave you a lcov.info file in the coverage folder. Now it’s time to generate the html report, in your terminal type:
perl %GENHTML% -o coverage\html coverage\lcov.info
and that will produce this output:

and the html reports look like:

and the main.dart file itself with coverage marked:

Conclusion
That is how to get locv html reports the easy way on windows for flutter app development. But, what about automation of the project workflow?
That is why these mini-articles are leading to in my next big article.
Resources
Resources specific to the article:
windows port of lcov@chocolatey https://chocolatey.org/packages/lcov
General Flutter and Dart resources:
Flutter Community Resources https://flutter.dev/community
Flutter SDK https://flutter.dev/docs/get-started/install
Android Studio IDE https://developer.android.com/studio
MS’s Visual Studio Code https://code.visualstudio.com/
Flutter Docs https://flutter.dev/docs
Dart Docs https://dart.dev/guides
Google Firebase Mobile Device TestLab https://firebase.google.com/docs/test-lab
Trademark Notice
Google LLC owns the following trademarks; Dart, Flutter, Android, Roboto, Noto. Apple Inc owns the trademarks iOS, MacOSX, Swift, and ObjectiveC. Apple Inc owns trademarks to their fonts of SF Pro, Sf Compact, SF mono, and New York. JetBeans Inc owns the trademarks to JetBeans, IntelliJ, and Kotlin. Oracle Inc owns the Java trademark. Microsoft Inc owns the trademarks to MS Windows OS and Powershell. Gradle is a trademark of Gradle Inc. The Git Project owns the trademark to Git. Linux Foundation owns the trademark to Linux. SmartPhone OME’s own trademarks to their mobile phone product names. To the best of my ability I follow the brand and usage guidelines with the above mentioned trademarks.
About Fred Grott
I’m the crazy SOB who as a former android mobile developer is starting to write about flutter mobile app development, design, and life(see Eff COVID and GOP https://fredgrott.medium.com/eff-covid-and-the-gop-e912db0548b8). Will I reach the pivotal One Million Medium monthly viewers mark? Sit-back and watch it happen. Find me on these social platforms: