Documentation
¶
Overview ¶
Package annotation provides utilities for parsing and managing test annotations that categorize e2e tests as parallel or serial execution.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterPattern ¶
FilterPattern creates a regex pattern to match only the specified tests
Types ¶
type ScanOptions ¶
type ScanOptions struct {
RequireAnnotations bool // If true, fail on unannotated tests
RequireReason bool // If true, fail on serial tests without reason
}
ScanOptions configures the behavior of test annotation scanning
func DefaultScanOptions ¶
func DefaultScanOptions() ScanOptions
DefaultScanOptions returns the default scanning options
type TestInfo ¶
type TestInfo struct {
Name string
File string
Line int
Execution string // "parallel" or "serial"
Reason string // Required for serial tests
}
TestInfo represents metadata about a test function
type TestManifest ¶
TestManifest holds categorized tests
func ScanTestAnnotations ¶
func ScanTestAnnotations(dir string, opts ScanOptions) (*TestManifest, error)
ScanTestAnnotations parses all *_test.go files in a directory and extracts test metadata. It enforces annotation requirements based on the provided options.
Click to show internal directories.
Click to hide internal directories.