Class WebCoverageCollector
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
configurationIConfiguration
WebCoverageCollector(string, IConfiguration?)
public WebCoverageCollector(string targetName, IConfiguration? configuration = null)
Parameters
targetNamestringThe registered target name;
"Web"for the built-in registration.configurationIConfigurationSupplies the explicit
ProtoTest:Web:Pagesinventory and the optional frontend folder underProtoTest:Web:Pages:Source, when present. A missing folder contributes nothing.
Properties
Category
public override string Category { get; }
Property Value
Methods
CanCollect(ProtoObservation)
Determines whether this collector accepts an observation.
public override bool CanCollect(ProtoObservation observation)
Parameters
observationProtoObservation
Returns
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
observationProtoObservation
GetReportItems()
public override IEnumerable<ProtoReportItem> GetReportItems()