checker

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2025 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrTestSkipped is returned when a test is marked with "skipped" status in the YAML file
	ErrTestSkipped = errors.New("test was skipped")
	// ErrTestBroken is returned when a test is marked with "broken" status in the YAML file
	ErrTestBroken = errors.New("test was broken")
)

Functions

This section is empty.

Types

type CheckerInterface

type CheckerInterface interface {
	// Check compares the actual test result against the expected result
	// Returns a list of validation errors and/or a critical error that stopped the test
	Check(models.TestInterface, *models.Result) ([]error, error)
}

CheckerInterface defines the basic interface for test result verification Implementations of this interface can verify if test results match expected outputs Custom checkers implementing this interface should be registered using the AddCheckers method

type ExtendedCheckerInterface added in v0.0.2

type ExtendedCheckerInterface interface {
	// BeforeTest runs before test execution to perform setup or validation
	// If BeforeTest returns an error, the test will not run and will be marked as failed
	BeforeTest(models.TestInterface) error

	// Check compares the actual test result against the expected result
	// Returns a list of validation errors and/or a critical error that stopped the test
	Check(models.TestInterface, *models.Result) ([]error, error)
}

ExtendedCheckerInterface extends CheckerInterface with pre-test functionality This allows for test preparation before execution (for example, make some customizations before running the test) Custom checkers implementing this interface should be registered using the AddCheckers method

Directories

Path Synopsis
addons

Jump to

Keyboard shortcuts

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