xunit

package
v0.0.0-...-1d50e38 Latest Latest
Warning

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

Go to latest
Published: May 30, 2017 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FailureDetails

type FailureDetails struct {
	Message string `xml:"message,attr"`
	Type    string `xml:"type,attr"`
	Content string `xml:",chardata"`
}

type TestCase

type TestCase struct {
	Name      string          `xml:"name,attr"`
	Time      float64         `xml:"time,attr"`
	ClassName string          `xml:"classname,attr"`
	Failure   *FailureDetails `xml:"failure"`
	Error     *FailureDetails `xml:"error"`
	Skipped   *FailureDetails `xml:"skipped"`
}

func (TestCase) ToModelTestResultAndLog

func (tc TestCase) ToModelTestResultAndLog(t *task.Task) (task.TestResult, *model.TestLog)

ToModelTestResultAndLog converts an xunit test case into an mci task.TestResult and model.TestLog. Logs are only generated if the test case did not succeed (this is part of the xunit xml file design)

type TestSuite

type TestSuite struct {
	Errors    int        `xml:"errors,attr"`
	Failures  int        `xml:"failures,attr"`
	Skip      int        `xml:"skip,attr"`
	Name      string     `xml:"name,attr"`
	TestCases []TestCase `xml:"testcase"`
	SysOut    string     `xml:"system-out"`
	SysErr    string     `xml:"system-err"`
}

type XUnitResults

type XUnitResults []TestSuite

func ParseXMLResults

func ParseXMLResults(reader io.Reader) (XUnitResults, error)

Jump to

Keyboard shortcuts

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