Documentation
¶
Overview ¶
Package execution provides mutation testing execution functionality.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine handles test execution using overlay-based mutation.
func (*Engine) RunMutations ¶
RunMutations executes tests for all mutants in parallel.
type MutationContext ¶
type MutationContext struct {
OriginalPath string // Absolute path to the original file
MutatedPath string // Path to the mutated file in temp directory
OverlayPath string // Path to the overlay.json file
MutantDir string // Directory containing this mutant's files
}
MutationContext holds the context for a single mutation execution.
type OverlayConfig ¶
type OverlayConfig struct {
Replace map[string]string `json:"Replace"` //nolint:tagliatelle // Go overlay spec requires "Replace"
}
OverlayConfig represents the JSON structure for go build/test -overlay option. Note: "Replace" must be capitalized as per Go's overlay specification.
type OverlayMutator ¶
type OverlayMutator struct {
// contains filtered or unexported fields
}
OverlayMutator manages overlay-based mutation without modifying original files.
func NewOverlayMutator ¶
func NewOverlayMutator() (*OverlayMutator, error)
NewOverlayMutator creates a new overlay-based mutator.
func (*OverlayMutator) Cleanup ¶
func (om *OverlayMutator) Cleanup() error
Cleanup removes all temporary files.
func (*OverlayMutator) CleanupMutation ¶
func (om *OverlayMutator) CleanupMutation(ctx *MutationContext) error
CleanupMutation removes temporary files for a single mutation.
func (*OverlayMutator) PrepareMutation ¶
func (om *OverlayMutator) PrepareMutation(mutant mutation.Mutant) (*MutationContext, error)
PrepareMutation prepares the mutation execution by creating mutated file and overlay.json.