Skip to main content
Version: v. 1

Spark coverage

NAME​

spark-coverage - Displays which parts of your code are covered by tests.

SYNOPSIS​

spark coverage [options]

DESCRIPTION​

Displays which parts of your code are covered by tests.

Options​

Report Options​

--report allows you to specify the report type to use for coverage. This flag can be used multiple times.

It has three different options and is set to summary by default.

summary
Outputs a chart showing what percentage of your code is covered by tests.

lcov
Creates a lcov.info file containing your coverage data in the root of your project's directory.

debug
Outputs lines describing the location of uncovered code.

Common Options​

-h
--help
Prints help information.

Optimization Option​

--ir-minimum allows you to run the coverage with via-ir enabled for the "minimum amount of optimization" necessary.

EXAMPLES​

  1. View summarized coverage:

    spark coverage
  2. Create lcov file with coverage data:

    spark coverage --report lcov
  3. Output uncovered code locations:

    spark coverage --report debug

SEE ALSO​

spark, spark test