Docs · API reference · Motus.Abstractions

CoverageData Class#

A snapshot of JavaScript and CSS code coverage data collected during a page session.

public sealed record CoverageData : System.IEquatable<Motus.Abstractions.CoverageData>

Inheritance System.Object → CoverageData

Implements System.IEquatable<CoverageData>

Constructors#

CoverageData(IReadOnlyList<ScriptCoverage>, IReadOnlyList<StylesheetCoverage>, CoverageSummary, DateTime, string, IReadOnlyList<OriginalFileCoverage>) Constructor#

A snapshot of JavaScript and CSS code coverage data collected during a page session.

public CoverageData(System.Collections.Generic.IReadOnlyList<Motus.Abstractions.ScriptCoverage> Scripts, System.Collections.Generic.IReadOnlyList<Motus.Abstractions.StylesheetCoverage> Stylesheets, Motus.Abstractions.CoverageSummary Summary, System.DateTime CollectedAtUtc, string? DiagnosticMessage=null, System.Collections.Generic.IReadOnlyList<Motus.Abstractions.OriginalFileCoverage>? OriginalFiles=null);

Parameters#

Scripts System.Collections.Generic.IReadOnlyList<ScriptCoverage>

Per-script JavaScript coverage entries.

Stylesheets System.Collections.Generic.IReadOnlyList<StylesheetCoverage>

Per-stylesheet CSS coverage entries.

Summary CoverageSummary

Aggregated coverage summary.

CollectedAtUtc System.DateTime

UTC timestamp when the snapshot was collected.

DiagnosticMessage System.String

Optional message when coverage could not be fully collected (e.g. transport does not support the CDP Profiler/CSS domains).

OriginalFiles System.Collections.Generic.IReadOnlyList<OriginalFileCoverage>

Coverage attributed to original (pre-bundle) source files via source-map resolution. Empty when no source maps were detected or all map fetches/parses failed.

Properties#

CollectedAtUtc Property#

UTC timestamp when the snapshot was collected.

public System.DateTime CollectedAtUtc { get; init; }

Property Value#

System.DateTime

DiagnosticMessage Property#

Optional message when coverage could not be fully collected (e.g. transport does not support the CDP Profiler/CSS domains).

public string? DiagnosticMessage { get; init; }

Property Value#

System.String

OriginalFiles Property#

Coverage attributed to original (pre-bundle) source files via source-map resolution. Never null; empty when no source maps were resolvable.

public System.Collections.Generic.IReadOnlyList<Motus.Abstractions.OriginalFileCoverage> OriginalFiles { get; init; }

Property Value#

System.Collections.Generic.IReadOnlyList<OriginalFileCoverage>

Scripts Property#

Per-script JavaScript coverage entries.

public System.Collections.Generic.IReadOnlyList<Motus.Abstractions.ScriptCoverage> Scripts { get; init; }

Property Value#

System.Collections.Generic.IReadOnlyList<ScriptCoverage>

Stylesheets Property#

Per-stylesheet CSS coverage entries.

public System.Collections.Generic.IReadOnlyList<Motus.Abstractions.StylesheetCoverage> Stylesheets { get; init; }

Property Value#

System.Collections.Generic.IReadOnlyList<StylesheetCoverage>

Summary Property#

Aggregated coverage summary.

public Motus.Abstractions.CoverageSummary Summary { get; init; }

Property Value#

CoverageSummary