Coverage

Browse docs

The concept of test coverage is to run your tests, and measure how much of your codebase was “covered” (executed) by your tests.

The thought is that with more coverage, more of your codebase will be bug-free.

This is why lde ships coverage out of the box.

Usage

Simply pass the --coverage flag when running tests.

lde test --coverage

This will output a report of executed lines, total executable lines and a relative percentage to know which files are least tested, ignoring whitespace and dependencies.

coverage

The line not executed here is line 8, where the error() is called, since testme is never called.