jacoco

package
v0.0.0-...-d4285bb Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2014 License: BSD-2-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BUILD_TEMPLATE = `` /* 3279-byte string literal not displayed */

)
View Source
const (
	NAME = "Jacoco"
)

Variables

View Source
var (
	ReportError = errors.New("no report created")
	CodeError   = errors.New("no code found")
)

Functions

func New

func New(baseDir, srcDir string, test, target *tool.Target, testId bson.ObjectId) (tool.T, error)

Types

type Class

type Class struct {
	Name     string     `xml:"name,attr"`
	Methods  []*Method  `xml:"method"`
	Counters []*Counter `xml:"counter"`
}

func (*Class) String

func (c *Class) String() string

type Classpath

type Classpath struct {
	Elements []*PathElement `xml:"pathelement"`
}

type Counter

type Counter struct {
	Type    string `xml:"type,attr"`
	Missed  uint   `xml:"missed,attr"`
	Covered uint   `xml:"covered,attr"`
}

func (*Counter) String

func (c *Counter) String() string

type Delete

type Delete struct {
	Dir string `xml:"dir,attr"`
}

type Dest

type Dest struct {
	Destdir  string `xml:"destdir,attr,omitempty"`
	Destfile string `xml:"destfile,attr,omitempty"`
}

type ExecutionData

type ExecutionData struct {
	Files []*File `xml:"file"`
}

type File

type File struct {
	Path string `xml:"file,attr"`
}

type Fileset

type Fileset struct {
	Dir      string `xml:"dir,attr"`
	Includes string `xml:"includes,attr"`
}

type Instrument

type Instrument struct {
	Destdir string     `xml:"destdir,attr,omitempty"`
	Fileset []*Fileset `xml:"fileset"`
}

type JUnit

type JUnit struct {
	Fork        bool        `xml:"fork,attr,omitempty"`
	ForkMode    string      `xml:"forkmode,attr,omitempty"`
	Tests       []*Test     `xml:"test"`
	Classpath   *Classpath  `xml:"classpath"`
	SysProperty SysProperty `xml:"sysproperty"`
	JVMArg      JVMArg      `xml:"jvmarg"`
}

type JVMArg

type JVMArg struct {
	Value string `xml:"value,attr"`
}

type JacocoReport

type JacocoReport struct {
	ExecutionData *ExecutionData `xml:"executiondata"`
	Structure     *Structure     `xml:"structure"`
	HTML          Dest           `xml:"html"`
	XML           Dest           `xml:"xml"`
}

type Javac

type Javac struct {
	Classpath string `xml:"classpath,attr,omitempty"`
	Srcdir    string `xml:"srcdir,attr,omitempty"`
	Destdir   string `xml:"destdir,attr,omitempty"`
	Debug     bool   `xml:"debug,attr,omitempty"`
	Include   string `xml:"includeantruntime,attr,omitempty"`
}

type Line

type Line struct {
	NR uint `xml:"nr,attr"`
	MI uint `xml:"mi,attr"`
	CI uint `xml:"ci,attr"`
	MB uint `xml:"mb,attr"`
	CB uint `xml:"cb,attr"`
}

func (*Line) String

func (l *Line) String() string

type Method

type Method struct {
	Name     string     `xml:"name,attr"`
	Desc     string     `xml:"desc,attr"`
	Line     uint       `xml:"line,attr"`
	Counters []*Counter `xml:"counter"`
}

func (*Method) String

func (m *Method) String() string

type Mkdir

type Mkdir struct {
	Dir string `xml:"dir,attr"`
}

type Package

type Package struct {
	Name     string     `xml:"name,attr"`
	Classes  []*Class   `xml:"class"`
	Sources  []*Source  `xml:"sourcefile"`
	Counters []*Counter `xml:"counter"`
}

func (*Package) String

func (p *Package) String() string

type PathElement

type PathElement struct {
	Path string `xml:"path,attr"`
}

type Project

type Project struct {
	XMLName     xml.Name    `xml:"project"`
	Name        string      `xml:"name,attr"`
	Default     string      `xml:"default,attr"`
	Namespace   string      `xml:"xmlns:jacoco,attr"`
	Description string      `xml:"description"`
	Properties  []*Property `xml:"property"`
	Taskdefs    []*Taskdef  `xml:"taskdef"`
	Targets     []*Target   `xml:"target"`
}

func NewProject

func NewProject(name, srcDir, resDir string, test *tool.Target) (*Project, error)

type Property

type Property struct {
	Name     string `xml:"name,attr"`
	Value    string `xml:"value,attr,omitempty"`
	Location string `xml:"location,attr,omitempty"`
}

type Report

type Report struct {
	Id           bson.ObjectId
	Name         string     `xml:"name,attr"`
	Packages     []*Package `xml:"package"`
	Counters     []*Counter `xml:"counter"`
	HTML         []byte
	MainCounters []*Counter
}

func NewReport

func NewReport(id bson.ObjectId, xmlData, htmlData []byte, target *tool.Target) (*Report, error)

NewReport

func (*Report) Class

func (r *Report) Class(name string) (*Class, error)

func (*Report) String

func (r *Report) String() string

type Result

type Result struct {
	Id       bson.ObjectId `bson:"_id"`
	FileId   bson.ObjectId `bson:"fileid"`
	TestId   bson.ObjectId `bson:"testid"`
	TestName string        `bson:"name"`
	Report   *Report       `bson:"report"`
	GridFS   bool          `bson:"gridfs"`
	Type     string        `bson:"type"`
}

func NewResult

func NewResult(fileId, testId bson.ObjectId, name string, xml, html []byte, target *tool.Target) (*Result, error)

func (*Result) ChartVals

func (r *Result) ChartVals() []*result.ChartVal

ChartVals

func (*Result) GetFileId

func (r *Result) GetFileId() bson.ObjectId

GetFileId

func (*Result) GetId

func (r *Result) GetId() bson.ObjectId

GetId

func (*Result) GetName

func (r *Result) GetName() string

GetName

func (*Result) GetTestId

func (r *Result) GetTestId() bson.ObjectId

func (*Result) GetType

func (r *Result) GetType() string

func (*Result) OnGridFS

func (r *Result) OnGridFS() bool

OnGridFS

func (*Result) Reporter

func (r *Result) Reporter() result.Reporter

func (*Result) SetReport

func (r *Result) SetReport(n result.Reporter)

SetReport

func (*Result) Success

func (r *Result) Success() bool

func (*Result) Template

func (r *Result) Template() string

type Source

type Source struct {
	Name     string     `xml:"name,attr"`
	Lines    []*Line    `xml:"line"`
	Counters []*Counter `xml:"counter"`
}

func (*Source) String

func (s *Source) String() string

type Sourcefiles

type Sourcefiles struct {
	Encoding string     `xml:"encoding,attr"`
	Files    []*Fileset `xml:"fileset"`
}

type Structure

type Structure struct {
	Name        string       `xml:"name,attr"`
	Classfiles  []*Fileset   `xml:"classfiles>fileset"`
	Sourcefiles *Sourcefiles `xml:"sourcefiles"`
}

type SysProperty

type SysProperty struct {
	Key  string `xml:"key,attr"`
	File string `xml:"file,attr"`
}

type Target

type Target struct {
	Name             string        `xml:"name,attr"`
	Depends          string        `xml:"depends,attr,omitempty"`
	Touch            *Touch        `xml:"touch"`
	Mkdir            *Mkdir        `xml:"mkdir"`
	Delete           *Delete       `xml:"delete"`
	Javac            *Javac        `xml:"javac"`
	InstrumentHolder *Instrument   `xml:"instrument"`
	InstrumentActual *Instrument   `xml:"jacoco:instrument"`
	JUnit            *JUnit        `xml:"junit"`
	ReportHolder     *JacocoReport `xml:"report"`
	ReportActual     *JacocoReport `xml:"jacoco:report"`
}

type Taskdef

type Taskdef struct {
	URI       string     `xml:"uri,attr"`
	Resource  string     `xml:"resource,attr"`
	Classpath *Classpath `xml:"classpath"`
}

type Test

type Test struct {
	Name string `xml:"name,attr"`
}

type Tool

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

func (*Tool) Lang

func (t *Tool) Lang() tool.Language

func (*Tool) Name

func (t *Tool) Name() string

func (*Tool) Run

func (t *Tool) Run(fileId bson.ObjectId, target *tool.Target) (result.Tooler, error)

type Touch

type Touch struct {
	File   string `xml:"file,attr"`
	Mkdirs bool   `xml:"mkdirs,attr"`
}

Jump to

Keyboard shortcuts

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