Documentation
¶
Overview ¶
Package runner provides functionality to execute and parse output from Go and Node.js test runs. It maps default test output into localized, visually structured terminal responses.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandFn ¶
CommandFn represents a function signature for instantiating an Exec implementation based on command arguments.
type Exec ¶
type Exec interface {
StdoutPipe() (io.ReadCloser, error)
Start() error
Wait() error
}
Exec defines the interface required to read output and handle process lifecycle for tests.
type Options ¶ added in v1.2.0
type Options struct {
RerunFailed bool // run only tests that failed on the previous run
ChangedOnly bool // run only packages touched according to git
}
Options configures incremental execution modes.
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
Runner holds the configuration and internal state needed to execute tests and aggregate failure data.
func New ¶
New creates and returns a Runner instance pointing to the specified language environment and command function.
func (*Runner) AutoExecute ¶ added in v1.1.0
AutoExecute detects the project framework, routes to the matching executor, and returns the process exit code. The caller is responsible for os.Exit.
func (*Runner) Execute ¶
Execute initiates Go language tests using JSON stream output, processes the results, and returns the process exit code.
func (*Runner) ExecuteNode ¶ added in v1.1.0
ExecuteNode executes Node.js tests capturing data using the TAP reporter stream, formats the output, and returns the process exit code.
func (*Runner) SetOptions ¶ added in v1.2.0
SetOptions configures the incremental execution modes for the runner.