Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ReportFileName string = "report.json"
ReportFileName File name for json report
Functions ¶
This section is empty.
Types ¶
type Mutant ¶
type Mutant struct {
Mutator Mutator `json:"mutator"`
Diff string `json:"diff"`
ProcessOutput string `json:"processOutput,omitempty"`
}
Mutant report by mutant for one mutation on one file
type Mutator ¶
type Mutator struct {
MutatorName string `json:"mutatorName"`
OriginalSourceCode string `json:"originalSourceCode"`
MutatedSourceCode string `json:"mutatedSourceCode"`
OriginalFilePath string `json:"originalFilePath"`
OriginalStartLine int64 `json:"originalStartLine"`
}
Mutator mutator and changes in file
type Options ¶
type Options struct {
General struct {
Debug bool `long:"debug" description:"Debug log output"`
DoNotRemoveTmpFolder bool `long:"do-not-remove-tmp-folder" description:"Do not remove the tmp folder where all mutations are saved to"`
Help bool `long:"help" description:"Show this help message"`
Verbose bool `long:"verbose" description:"Verbose log output"`
Config string `long:"config" description:"Path to config file"`
} `group:"General options"`
Files struct {
Blacklist []string `` /* 140-byte string literal not displayed */
ListFiles bool `long:"list-files" description:"List found files"`
PrintAST bool `long:"print-ast" description:"Print the ASTs of all given files and exit"`
} `group:"File options"`
Mutator struct {
DisableMutators []string `` /* 157-byte string literal not displayed */
ListMutators bool `long:"list-mutators" description:"List all available mutators (including disabled)"`
} `group:"Mutator options"`
Filter struct {
Match string `long:"match" description:"Only functions are mutated that confirm to the arguments regex"`
} `group:"Filter options"`
Exec struct {
Exec string `long:"exec" description:"Execute this command for every mutation (by default the built-in exec command is used)"`
NoExec bool `long:"no-exec" description:"Skip the built-in exec command and just generate the mutations"`
Timeout uint `long:"exec-timeout" description:"Sets a timeout for the command execution (in seconds)" default:"10"`
} `group:"Exec options"`
Test struct {
Recursive bool `long:"test-recursive" description:"Defines if the executer should test recursively"`
} `group:"Test options"`
Remaining struct {
Targets []string `description:"Packages, directories and files even with patterns (by default the current directory)"`
} `positional-args:"true" required:"true"`
Config struct {
SkipFileWithoutTest bool `yaml:"skip_without_test"`
SkipFileWithBuildTag bool `yaml:"skip_with_build_tags"`
JSONOutput bool `yaml:"json_output"`
SilentMode bool `yaml:"silent_mode"`
ExcludeDirs []string `yaml:"exclude_dirs"`
}
}
Options Main config structure
type Report ¶
type Report struct {
Stats Stats `json:"stats"`
Escaped []Mutant `json:"escaped"`
Timeouted []Mutant `json:"timeouted"`
Killed []Mutant `json:"killed"`
Errored []Mutant `json:"errored"`
}
Report Structure for mutation report
func (*Report) TotalCount ¶
TotalCount total mutations count
type Stats ¶
type Stats struct {
TotalMutantsCount int64 `json:"totalMutantsCount"`
KilledCount int64 `json:"killedCount"`
NotCoveredCount int64 `json:"notCoveredCount"`
EscapedCount int64 `json:"escapedCount"`
ErrorCount int64 `json:"errorCount"`
SkippedCount int64 `json:"skippedCount"`
TimeOutCount int64 `json:"timeOutCount"`
Msi float64 `json:"msi"`
MutationCodeCoverage int64 `json:"mutationCodeCoverage"`
CoveredCodeMsi float64 `json:"coveredCodeMsi"`
DuplicatedCount int64 `json:"-"`
}
Stats There is stats for mutations
Click to show internal directories.
Click to hide internal directories.