testreport

package
v1.235.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: Apache-2.0 Imports: 15 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package testreport renders test execution using the shared Atmos tree geometry.

Index

Constants

View Source
const (
	Passed   = "passed"
	Failed   = "failed"
	Skipped  = "skipped"
	Canceled = "canceled"
	Pending  = "pending"
	Running  = "running"
)

Test case lifecycle states shared by the executor and renderer.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

type Node struct {
	ID, Name, Status string
	Duration         time.Duration
	Children         []*Node
}

Node is a group or an individual expanded test case.

type Reporter

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

Reporter owns the display for one test group; updates may arrive concurrently.

func New

func New(title string, roots []*Node, output io.Writer) *Reporter

New constructs a reporter. The execution tree is fixed before any tests run.

func (*Reporter) Counts

func (r *Reporter) Counts() map[string]int

Counts returns terminal leaf counts, never counting group nodes twice.

func (*Reporter) Finish

func (r *Reporter) Finish() error

Finish leaves a permanent tree and summary in scrollback.

func (*Reporter) Start

func (r *Reporter) Start(live bool, cancel context.CancelFunc)

Start enables live rendering only when the caller owns an interactive terminal.

func (*Reporter) Update

func (r *Reporter) Update(id, status string, duration time.Duration, logs string)

Update changes a case state. Output blocks are published once on completion.

func (*Reporter) View

func (r *Reporter) View(width int, spinning string, final bool) string

View builds a connected tree and bottom progress bar.

Jump to

Keyboard shortcuts

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