coverage

Introduction

coverage runs pytest with coverage over the modules/ folder of the selected product (SPLENT_APP), <product>/src/<product>/modules/.

splent coverage

A product composed from features has no modules/ folder, since its tests live in each feature. Run those with feature:test or product:test.


Covering one module

splent coverage notes

It covers only modules/notes/.


Writing an HTML report

splent coverage --html

The report goes to htmlcov/, in place of the summary in the terminal.


Reference

Argument or option Description
MODULE_NAME Cover only modules/<MODULE_NAME>/
--html Write an HTML report to htmlcov/

It runs pytest --ignore-glob=*selenium* --cov=<path> <path>, with --cov-report html when you pass --html. All of these exit 1.

Situation Message
No modules/ folder Error: <product> has no modules/ directory, so there is nothing for coverage to run. and a pointer to feature:test and product:test
The module does not exist Error: Module '<name>' does not exist.
A test fails ❌ Coverage run failed (tests may be failing).

Back to top

splent. Distributed by an LGPL license v3. Contact us: drorganvidez@us.es