testrunner

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Check

type Check struct {
	ID        string    `json:"id"`
	Name      string    `json:"name"`
	Command   []string  `json:"command"`
	Kind      Kind      `json:"kind"`
	Framework Framework `json:"framework"`
}

Check is a runnable workspace verification command discovered from project files.

func Detect

func Detect(root string) ([]Check, error)

Detect discovers common test and verification commands in root.

type Failure

type Failure struct {
	Name    string `json:"name"`
	File    string `json:"file,omitempty"`
	Message string `json:"message,omitempty"`
}

Failure captures the most useful location and message for a failing test.

type Framework

type Framework string

Framework identifies the runner family used to execute or parse a check.

const (
	FrameworkGo     Framework = "go"
	FrameworkBun    Framework = "bun"
	FrameworkNode   Framework = "node"
	FrameworkPytest Framework = "pytest"
	FrameworkCargo  Framework = "cargo"
)

type Kind

type Kind string

Kind describes the broad purpose of a detected verification check.

const (
	KindTest      Kind = "test"
	KindTypecheck Kind = "typecheck"
	KindBuild     Kind = "build"
	KindLint      Kind = "lint"
)

type Summary

type Summary struct {
	Framework Framework `json:"framework"`
	Total     int       `json:"total,omitempty"`
	Passed    int       `json:"passed,omitempty"`
	Failed    int       `json:"failed,omitempty"`
	Skipped   int       `json:"skipped,omitempty"`
	Failures  []Failure `json:"failures,omitempty"`
}

Summary is the structured test result parsed from runner output.

func ParseSummary

func ParseSummary(check Check, stdout string, stderr string) *Summary

ParseSummary extracts structured test counts and failures from runner output.

Jump to

Keyboard shortcuts

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