jtbd

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Annotation

type Annotation struct {
	Package  string   // full import path
	FuncName string   // e.g., "TestSave"
	JobIDs   []string // e.g., ["KG-P1", "CORE-2"]
}

Annotation maps a test function to the JTBDs it serves.

func Scan

func Scan(root, modulePath string) ([]Annotation, error)

Scan walks root for _test.go files and extracts // Serves: annotations from doc comments on Test* functions. modulePath is the Go module path.

type Job

type Job struct {
	ID        string
	Layer     string
	Domain    string // extracted from ID prefix (e.g., "KG" from "KG-P1")
	Statement string
}

Job is a user-facing job definition.

type JobResult

type JobResult struct {
	Job    Job
	Status string // "running", "broken", "wip"
	Tests  []TestOutcome
	Passed int
	Failed int
	Total  int
}

JobResult is one JTBD with its aggregate status.

type Report

type Report struct {
	Jobs    []JobResult
	Running int
	Broken  int
	WIP     int
	Total   int
}

Report is the assembled JTBD coverage report.

func Assemble

func Assemble(jobs []Job, annotations []Annotation, results []testjson.TestPackageResult) *Report

Assemble joins job definitions, source annotations, and test results into a Report.

type TestOutcome

type TestOutcome struct {
	Package  string
	FuncName string
	Status   string // "pass", "fail", "skip"
}

TestOutcome is the result of a single test function.

Jump to

Keyboard shortcuts

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