junit

package
v0.0.0-...-a6c55ee Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2017 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateJunitTestReport

func GenerateJunitTestReport(result *TestSuite, path string) (err error)

Types

type Error

type Error struct {
	XMLName xml.Name `xml:"error"`

	Type       string `xml:"type,attr"`
	StackTrace string `xml:",chardata"`
}

type Failure

type Failure struct {
	XMLName xml.Name `xml:"failure"`

	Message    string `xml:"message,attr"`
	Type       string `xml:"type,attr"`
	StackTrace string `xml:",chardata"`
}

type Skipped

type Skipped struct {
	XMLName xml.Name `xml:"skipped"`
}

type SystemOut

type SystemOut struct {
	XMLName xml.Name `xml:"system-out"`

	Log string `xml:",chardata"`
}

type TestCase

type TestCase struct {
	XMLName xml.Name `xml:"testcase"`

	Time      float64 `xml:"time,attr"`
	ClassName string  `xml:"classname,attr"`
	Name      string  `xml:"name,attr"`

	Skipped   *Skipped   `xml:"skipped"`
	Error     *Error     `xml:"error"`
	Failure   *Failure   `xml:"failure"`
	SystemOut *SystemOut `xml:"system-out"`
}

func (*TestCase) IsError

func (t *TestCase) IsError() bool

func (*TestCase) IsFail

func (t *TestCase) IsFail() bool

func (*TestCase) IsSkip

func (t *TestCase) IsSkip() bool

func (*TestCase) Type

func (t *TestCase) Type() string

type TestSuite

type TestSuite struct {
	XMLName xml.Name `xml:"testsuite"`

	Failures int     `xml:"failures,attr"`
	Time     float64 `xml:"time,attr"`
	Errors   int     `xml:"errors,attr"`
	Skipped  int     `xml:"skipped,attr"`
	Tests    int     `xml:"tests,attr"`
	Name     string  `xml:"name,attr"`

	TestCases []*TestCase `xml:"testcase"`
}

func NewTestSuite

func NewTestSuite() *TestSuite

func Read

func Read(f string) (suite *TestSuite, err error)

func (*TestSuite) Merge

func (s *TestSuite) Merge(another *TestSuite)

type TestSuites

type TestSuites struct {
	XMLName xml.Name `xml:"testsuites"`

	TestSuites []*TestSuite `xml:"testsuite"`
}

Jump to

Keyboard shortcuts

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