pitest

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2026 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileMutations

type FileMutations map[string][]*Mutation

FileMutations stores all mutants of the same file against the string of the full file path.

type Mutation

type Mutation struct {
	Detected          bool             `xml:"detected,attr"`
	Status            mutations.Status `xml:"status,attr"`
	NumTestsRun       int              `xml:"numberOfTestsRun,attr"`
	SourceFile        string           `xml:"sourceFile"`
	MutatedClass      string           `xml:"mutatedClass"`
	MutatedMethod     string           `xml:"mutatedMethod"`
	MethodDescription string           `xml:"methodDescription"`
	LineNumber        int              `xml:"lineNumber"`
	Mutator           string           `xml:"mutator"`
	KillingTest       string           `xml:"killingTest"`
	Description       string           `xml:"description"`
	MutationIndex     int              // NOTE: used to determine which mutants to decompile. Not present in XML.
}

Mutation is a struct that can accept the pitest xml output.

func (*Mutation) MutantExportDir

func (m *Mutation) MutantExportDir() string

func (*Mutation) MutatedClassPath

func (m *Mutation) MutatedClassPath() string

func (*Mutation) SourceClassPath

func (m *Mutation) SourceClassPath() string

func (*Mutation) SourceCodePath

func (m *Mutation) SourceCodePath() string

type PitXML

type PitXML struct {
	XMLName   xml.Name    `xml:"mutations"`
	Mutations []*Mutation `xml:"mutation"`
}

type Pitest

type Pitest struct {
	// contains filtered or unexported fields
}

Pitest is the Framework object for the pitest library.

func NewPitest

func NewPitest() *Pitest

func (*Pitest) LoadResults

func (p *Pitest) LoadResults() error

func (*Pitest) Meta

func (p *Pitest) Meta() *fwlib.Meta

func (*Pitest) Mutations

func (p *Pitest) Mutations() mutations.Mutations

func (*Pitest) ReadLines

func (p *Pitest) ReadLines(file string) ([]string, error)

func (*Pitest) SetDecompiler

func (p *Pitest) SetDecompiler()

func (*Pitest) TransformResults

func (p *Pitest) TransformResults() error

func (*Pitest) Yaml

func (p *Pitest) Yaml() fwlib.FWConfig

type YamlConfig

type YamlConfig struct {
	XmlPath      string `yaml:"xml-path"`
	SrcCodePath  string `yaml:"src-code-path"`
	SrcClassPath string `yaml:"src-class-path"`
	MutClassPath string `yaml:"mut-class-path"`
	Decompiler   string `yaml:"decompiler"`
}

YamlConfig represents Pitest's yml config data.

type YamlWrapper

type YamlWrapper struct {
	Cfg *YamlConfig `yaml:"pitest"`
}

YamlWrapper used to load the pitest configuration from the .marv.yml file.

func (*YamlWrapper) Init

func (y *YamlWrapper) Init() interface{}

func (*YamlWrapper) Load

func (y *YamlWrapper) Load(yml []byte) (bool, error)

Jump to

Keyboard shortcuts

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