nunit

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 GenerateNUnitTestReport

func GenerateNUnitTestReport(result *TestResults, path string) (err error)

Types

type Categories

type Categories struct {
	Categories []*Category `xml:"category"`
}

type Category

type Category struct {
	XMLName xml.Name `xml:"category"`
	Name    string   `xml:"name,attr"`
}

type Environment

type Environment struct {
	XMLName      xml.Name `xl:"environment"`
	NUnitVersion string   `xml:"nunit-version,attr"`
	ClrVersion   string   `xml:"clr-version,attr"`
	OsVersion    string   `xml:"os-version,attr"`
	Platform     string   `xml:"platform,attr"`
	Cwd          string   `xml:"cwd,attr"`
	MachineName  string   `xml:"machine-name,attr"`
	User         string   `xml:"user,attr"`
	UserDomain   string   `xml:"user-domain,attr"`
}

type Failure

type Failure struct {
	XMLName    xml.Name    `xml:"failure"`
	Message    *Message    `xml:"message"`
	StackTrace *StackTrace `xml:"stack-trace"`
}

type Message

type Message struct {
	XMLName xml.Name `xml:"message"`
	Content string   `xml:",chardata"`
}

type Properties

type Properties struct {
	XMLName    xml.Name    `xml:"properties"`
	Properties []*Property `xml:"property"`
}

type Property

type Property struct {
	XMLName xml.Name `xml:"property"`
	Name    string   `xml:"name,attr"`
	Value   string   `xml:"value,attr"`
}

type Reason

type Reason struct {
	XMLName xml.Name `xml:"reason"`
	Message *Message `xml:"message"`
}

type StackTrace

type StackTrace struct {
	XMLName xml.Name `xml:"stack-trace"`
	Content string   `xml:",chardata"`
}

type TestCase

type TestCase struct {
	XMLName xml.Name `xml:"test-case"`

	Name        string  `xml:"name,attr"`
	Description string  `xml:"description,attr"`
	Success     string  `xml:"success,attr"`
	Time        float64 `xml:"time.attr"`
	Executed    bool    `xml:"executed,attr"`
	Asserts     int     `xml:"asserts,attr"`

	Categories *Categories `xml:"categories"`
	Properties *Properties `xml:"properties"`
	Failure    *Failure    `xml:"failure"`
	Reason     *Reason     `xml:"reason"`
}

type TestResults

type TestResults struct {
	XMLName xml.Name `xml:"test-results"`

	Name     string `xml:"name,attr"`
	Total    int    `xml:"total,attr"`
	Errors   int    `xml:"errors,attr"`
	Failures int    `xml:"failures,attr"`
	NotRun   int    `xml:"not-run,attr"`
	Ignored  int    `xml:"ignored,attr"`
	Skipped  int    `xml:"skipped,attr"`
	Invalid  int    `xml:"invalid,attr"`

	Environment *Environment `xml:"environment"`
	TestSuite   *TestSuite   `xml:"test-suite"`

	Time      float64
	TestCases []*TestCase
}

func NewTestResults

func NewTestResults() *TestResults

func Read

func Read(f string) (results *TestResults, err error)

func (*TestResults) Merge

func (t *TestResults) Merge(another *TestResults)

type TestSuite

type TestSuite struct {
	XMLName xml.Name `xml:"test-suite"`

	Name     string  `xml:"name,attr"`
	Executed bool    `xml:"executed,attr"`
	Success  bool    `xml:"success,attr"`
	Time     float64 `xml:"time,attr"`
	Asserts  int     `xml:"asserts,attr"`

	Categories *Categories `xml:"categories"`
	Properties *Properties `xml:"properties"`
	Failure    *Failure    `xml:"failure"`
	Reason     *Reason     `xml:"reason"`

	TestSuites []*TestSuite `xml:"results>test-suite"`
	TestCases  []*TestCase  `xml:"results>test-case"`
}

func (*TestSuite) InternalTestCases

func (t *TestSuite) InternalTestCases() []*TestCase

Jump to

Keyboard shortcuts

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