Skip to content

Coverage

Simple coverage statistics collection for bash scripts to compute testing code coverage.

⬅ Parent


Usage

bashCoverage [ --target reportFile ] thingToRun

Collect code coverage statistics for a code sample Convert resulting files using bashCoverageReport

Arguments

  • --target reportFile - File. Optional. Write coverage data to this file.
  • thingToRun - Callable. Required. Function to run and collect coverage data.

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

Reporting - work in progress

Usage

bashCoverageReport [ --cache cacheDirectory ] [ --target targetDirectory ] statsFile

Generate a coverage report using the coverage statistics file This is a work in progress and is unfinished as of January 2026. Plans are to do this in another language.

Reads standard input

Accepts a stats file

Arguments

  • --cache cacheDirectory - Optional. Directory.
  • --target targetDirectory - Optional. Directory.
  • statsFile - File. Required.

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error