coverage

package
v0.4.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 26, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package coverage collects and isolates Go, Node/V8, and source-level Istanbul browser coverage artifacts produced by framework test blocks.

Package coverage collects coverage artifacts from a block's containers.

Index

Constants

View Source
const EnvOut = "IT_COVERAGE_OUT"

EnvOut overrides the default coverage output directory.

View Source
const GuestDir = "/coverage"

GuestDir is the coverage directory inside instrumented containers.

Variables

This section is empty.

Functions

func CopyDir

func CopyDir(ctx context.Context, containerID, srcPath, dst string) error

CopyDir copies a directory from a running or stopped container into dst.

func WriteIstanbulReport

func WriteIstanbulReport(filename string, report any) error

WriteIstanbulReport writes one browser coverage snapshot atomically.

Types

type Sink

type Sink struct {
	// contains filtered or unexported fields
}

Sink stores counters in separate directories for each block and service.

func NewSink

func NewSink(root string) (*Sink, error)

NewSink creates a unique directory for a new coverage run beneath root.

func (*Sink) BrowserDir

func (s *Sink) BrowserDir(block, scenario string) (string, error)

BrowserDir returns a unique directory for one browser scenario.

func (*Sink) Dir

func (s *Sink) Dir(block, service string) (string, error)

Dir returns, creating it if needed, the directory for one container's counters. Safe to call concurrently — parallel blocks collect at the same time.

func (*Sink) Root

func (s *Sink) Root() string

Root returns the sink's absolute root directory.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL