Skip to content

Latest commit

 

History

History
43 lines (28 loc) · 1.03 KB

coverage_reports.md

File metadata and controls

43 lines (28 loc) · 1.03 KB

Coverage Reports

Generating HTML Report from LCOV

Enable coverage reporting by setting the corpusDirectory key in the configuration file and setting the coverageReports key to ["lcov", "html"].

{
  "corpusDirectory": "corpus",
  "coverageReports": ["lcov", "html"]
}

Install lcov and genhtml

Linux:

apt-get install lcov

MacOS:

brew install lcov

Generate LCOV Report

genhtml corpus/coverage/lcov.info --output-dir corpus --rc derive_function_end_line=0

Warning

** The derive_function_end_line flag is required to prevent the genhtml tool from crashing when processing the Solidity source code. **

Open the corpus/index.html file in your browser or follow the steps to use VSCode below.

View Coverage Report in VSCode with Coverage Gutters

Install the Coverage Gutters extension.

Then, right click in a project file and select Coverage Gutters: Display Coverage.