Skip to content

Coverage Report

Billy Cropley edited this page Oct 15, 2018 · 16 revisions

Automated Coverage Report Generator

The coverage report generator is an automatically generated coverage report of all testable code run through the Meadow tooling suite.

Index

The index.html page shows a table of all .sol files present in the contracts directory with percentages and current number of lines, branches and functions that have been covered. Below the table is a list of all tests contained in the .cs file, sorted by their respective TestClass. An icon is displayed to the left of the test name showing a passing or failing result, and to the right is the amount of time it took to run the test.

Index Page

Coverage Page

Clicking on any of the individual files listed on the index page will open the generated coverage view for that file. Coverage Page

The status bar along the top of the page shows the number of lines, branches, and functions that have been covered along with percentages of their totals.

Documented Coverage Types

Color coded line coverage

Each line will be highlighted depending on how it has been tested. Green is shown for lines that have been hit, red for lines that have not been hit, and yellow for lines that are unhittable in their current implementation.

Coverage

Number of times each line was run

Going down the lefthand side of each page is a code line count with a display of how many times that line has been run during testing.

Number of times covered

If and Else branch icons

To the left of the code are icons representing any conditional statement branches.

  • A red null symbol is displayed if the function has not been hit and neither branch has been satisfied.

Null symbol

  • An I is shown if the statement failed or reverted and did not satisfy the if condition.

If icon

  • And an E is shown if the statement was successfully passed but still has an unsatisfied else condition.

Else icon

  • A green checkmark denotes that all conditional requirements have been met.

Checkmark

Example Coverage Report Coverage report