Documentation
¶
Index ¶
- func DiscoverFeatureFiles(path string) ([]string, error)
- func PrintParallelResults(results *AggregatedResults)
- func UniqueStrings(input []string) []string
- type AggregatedResults
- type FeatureProgress
- type FeatureResult
- type FeatureStatus
- type ParallelConfig
- type ParallelRunner
- type ProgressTracker
- type Runner
- type SummaryPrinter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DiscoverFeatureFiles ¶ added in v0.1.1
DiscoverFeatureFiles finds all .feature files in the given path. If path is a file, returns a single-element slice. If path is a directory, recursively finds all .feature files.
func PrintParallelResults ¶ added in v0.1.1
func PrintParallelResults(results *AggregatedResults)
PrintParallelResults is a convenience function to print parallel execution results.
func UniqueStrings ¶ added in v0.1.1
UniqueStrings removes duplicate strings from a slice while preserving order.
Types ¶
type AggregatedResults ¶ added in v0.1.1
type AggregatedResults struct {
TotalFeatures int
PassedFeatures int
FailedFeatures int
TotalDuration time.Duration
Results []FeatureResult
}
AggregatedResults combines results from all parallel executions.
type FeatureProgress ¶ added in v0.1.1
type FeatureProgress struct {
Index int
Path string
Status FeatureStatus
StartTime time.Time
DisplayName string
}
FeatureProgress tracks the state of a single feature execution.
type FeatureResult ¶ added in v0.1.1
type FeatureResult struct {
FeaturePath string // Path to the .feature file
Status FeatureStatus // Overall status
Duration time.Duration // Execution duration
Error error // Error if failed
}
FeatureResult captures the result of a single feature file execution.
type FeatureStatus ¶ added in v0.1.1
type FeatureStatus int
FeatureStatus represents the execution status of a feature.
const ( StatusPending FeatureStatus = iota StatusRunning StatusPassed StatusFailed StatusTimeout StatusCanceled )
func (FeatureStatus) String ¶ added in v0.1.1
func (s FeatureStatus) String() string
type ParallelConfig ¶ added in v0.1.1
type ParallelConfig struct {
MaxWorkers int // Maximum concurrent feature executions
Timeout time.Duration // Per-feature timeout (0 = no timeout)
}
ParallelConfig holds configuration for parallel execution.
type ParallelRunner ¶ added in v0.1.1
type ParallelRunner struct {
// contains filtered or unexported fields
}
ParallelRunner orchestrates parallel feature execution.
func NewParallelRunner ¶ added in v0.1.1
func NewParallelRunner(cfg *config.Config, parallelCfg ParallelConfig) *ParallelRunner
NewParallelRunner creates a new parallel runner.
func (*ParallelRunner) Cancel ¶ added in v0.1.1
func (pr *ParallelRunner) Cancel()
Cancel stops all running feature executions.
func (*ParallelRunner) GetProgress ¶ added in v0.1.1
func (pr *ParallelRunner) GetProgress() *ProgressTracker
GetProgress returns the current progress tracker.
func (*ParallelRunner) RunParallel ¶ added in v0.1.1
func (pr *ParallelRunner) RunParallel(ctx context.Context, featurePaths []string, format string) (*AggregatedResults, error)
RunParallel executes multiple feature files in parallel.
type ProgressTracker ¶ added in v0.1.1
type ProgressTracker struct {
// contains filtered or unexported fields
}
ProgressTracker manages and displays progress for parallel feature execution.
func NewProgressTracker ¶ added in v0.1.1
func NewProgressTracker(totalFeatures, maxWorkers int) *ProgressTracker
NewProgressTracker creates a new progress tracker.
func (*ProgressTracker) PrintHeader ¶ added in v0.1.1
func (pt *ProgressTracker) PrintHeader()
PrintHeader prints the initial progress header.
func (*ProgressTracker) UpdateStatus ¶ added in v0.1.1
func (pt *ProgressTracker) UpdateStatus(index int, path string, status FeatureStatus)
UpdateStatus updates the status of a feature and prints progress.
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
Runner handles the execution of feature files
func (*Runner) RunWithFormat ¶ added in v0.1.0
RunWithFormat executes the specified feature file with a custom formatter
type SummaryPrinter ¶ added in v0.1.1
type SummaryPrinter struct {
// contains filtered or unexported fields
}
SummaryPrinter handles printing aggregated results.
func NewSummaryPrinter ¶ added in v0.1.1
func NewSummaryPrinter(w io.Writer) *SummaryPrinter
NewSummaryPrinter creates a new summary printer.
func (*SummaryPrinter) PrintParallelSummary ¶ added in v0.1.1
func (sp *SummaryPrinter) PrintParallelSummary(results *AggregatedResults)
PrintParallelSummary prints both detailed results and summary.
func (*SummaryPrinter) PrintResults ¶ added in v0.1.1
func (sp *SummaryPrinter) PrintResults(results *AggregatedResults)
PrintResults prints the detailed results for each feature.
func (*SummaryPrinter) PrintSummary ¶ added in v0.1.1
func (sp *SummaryPrinter) PrintSummary(results *AggregatedResults)
PrintSummary prints the final summary statistics.