CodeCoverageExtractor class
Component used to generate a CoverageReport for a given package. This is the main class of the package, summarizing all of its funcionality.
Constructors
- CodeCoverageExtractor({required HitmapReader hitmapReader, required CoverageReportFactory coverageReportFactory, required ProcessRunner processRunner})
- CodeCoverageExtractor.createDefault()
-
Creates a CodeCoverageExtractor instance with default dependencies
factory
Properties
- coverageReportFactory → CoverageReportFactory
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hitmapReader → HitmapReader
-
final
- processRunner → ProcessRunner
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
extract(
{required Directory packageDirectory, required bool showTestOutput, List< String> ? includeRegexes, List<String> ? excludeRegexes, bool? ignoreBarrelFiles}) → Future<CoverageExtractionResult> -
Runs the given package tests with the processRunner, parses the coverage output
with the hitmapReader and creates a CoverageReport with the coverageReportFactory
with the resulting hitmaps.
Return a
CoverageExtractionResult
containing the coverage report and the status of the tests executed as a TestResultStatus. If the showTestOutput flag is true, the tests outputs will be shows in the console -
hasTestDirectory(
Directory packageDirectory) → bool -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited