Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Block ¶
Block holds the start and end coordinates of a section of a source file covered by tests.
type Coverage ¶
type Coverage struct {
// contains filtered or unexported fields
}
Coverage is responsible for executing a Go test with coverage via the Run() method, then parsing the result coverage report file.
func New ¶
New instantiates a Coverage element using exec.Command as execContext, actually running the command on the OS.
func NewWithCmd ¶
func NewWithCmd(cmdContext execContext, workdir string, mod gomodule.GoModule, opts ...Option) *Coverage
NewWithCmd instantiates a Coverage element given a custom execContext.
func (*Coverage) Run ¶
Run executes the coverage command and parses the results, returning a *Profile object. Before executing the coverage, it downloads the go modules in a separate step. This is done to avoid that the download phase impacts the execution time which is later used as timeout for the mutant testing execution.