Lcov On Windows

Fred Grott
3 min readFeb 15, 2021

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

--

--