Class WebCoverageCollector

Namespace
ProtoTest.Web
Assembly
ProtoTest.Web.dll

Aggregates page coverage: every page path the suite visited, verified or discovered, plus the inventory in ProtoTest:Web:Pages and the frontend routes discovered from ProtoTest:Web:Pages:Source. A page is covered only when a web.page.verified observation was recorded for it; a page that was merely visited, or that only exists in the inventory, is reported uncovered. A concrete path that matches an inventory pattern lands on the pattern: verifying /users/42 covers /users/{id}.

public sealed class WebCoverageCollector : ProtoCoverageCollector, IProtoCollector, IProtoReportSource
Inheritance
WebCoverageCollector
Implements
Inherited Members
Extension Methods

Constructors

WebCoverageCollector(IConfiguration)

Creates the built-in collector under the Web target, reading ProtoTest:Web:Pages, ProtoTest:Web:Pages:Source and ProtoTest:Web:Pages:Framework.

public WebCoverageCollector(IConfiguration configuration)

Parameters

configuration IConfiguration

WebCoverageCollector(string, IConfiguration?)

public WebCoverageCollector(string targetName, IConfiguration? configuration = null)

Parameters

targetName string

The registered target name; "Web" for the built-in registration.

configuration IConfiguration

Supplies the explicit ProtoTest:Web:Pages inventory and the optional frontend folder under ProtoTest:Web:Pages:Source, when present. A missing folder contributes nothing.

Properties

Category

public override string Category { get; }

Property Value

string

Methods

CanCollect(ProtoObservation)

Determines whether this collector accepts an observation.

public override bool CanCollect(ProtoObservation observation)

Parameters

observation ProtoObservation

Returns

bool

Collect(ProtoObservation)

Records an incoming observation. Implementations should support concurrent calls when tests or requests execute in parallel.

public override void Collect(ProtoObservation observation)

Parameters

observation ProtoObservation

GetReportItems()

public override IEnumerable<ProtoReportItem> GetReportItems()

Returns

IEnumerable<ProtoReportItem>