testreport

package
v1.229.0-rc.3 Latest Latest
Warning

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

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

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