reporter

package
v0.0.0-...-6fcca8b Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2016 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package reporter provides reporters for generating reports with the results of the tests

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JUnitReportXML

func JUnitReportXML(report *parser.Report, noXMLHeader bool, w io.Writer) error

JUnitReportXML writes a JUnit xml representation of the given report to w in the format described at http://windyroad.org/dl/Open%20Source/JUnit.xsd

Types

type JUnitFailure

type JUnitFailure struct {
	Message  string `xml:"message,attr"`
	Type     string `xml:"type,attr"`
	Contents string `xml:",chardata"`
}

JUnitFailure contains data related to a failed test.

type JUnitProperty

type JUnitProperty struct {
	Name  string `xml:"name,attr"`
	Value string `xml:"value,attr"`
}

JUnitProperty represents a key/value pair used to define properties.

type JUnitSkipMessage

type JUnitSkipMessage struct {
	Message string `xml:"message,attr"`
}

JUnitSkipMessage contains the reason why a testcase was skipped.

type JUnitTestCase

type JUnitTestCase struct {
	XMLName     xml.Name          `xml:"testcase"`
	Classname   string            `xml:"classname,attr"`
	Name        string            `xml:"name,attr"`
	Time        string            `xml:"time,attr"`
	SkipMessage *JUnitSkipMessage `xml:"skipped,omitempty"`
	Failure     *JUnitFailure     `xml:"failure,omitempty"`
}

JUnitTestCase is a single test case with its result.

type JUnitTestSuite

type JUnitTestSuite struct {
	XMLName    xml.Name        `xml:"testsuite"`
	Tests      int             `xml:"tests,attr"`
	Failures   int             `xml:"failures,attr"`
	Time       string          `xml:"time,attr"`
	Name       string          `xml:"name,attr"`
	Properties []JUnitProperty `xml:"properties>property,omitempty"`
	TestCases  []JUnitTestCase
}

JUnitTestSuite is a single JUnit test suite which may contain many testcases.

type JUnitTestSuites

type JUnitTestSuites struct {
	XMLName xml.Name `xml:"testsuites"`
	Suites  []JUnitTestSuite
}

JUnitTestSuites is a collection of JUnit test suites.

type JunitReporter

type JunitReporter struct {
	Packages []*parser.Package
}

JunitReporter generates tests reports in the JUnit XML format

func (*JunitReporter) GenerateReport

func (jr *JunitReporter) GenerateReport(results []gucumber.RunnerResult, w io.Writer) error

GenerateReport writes a report in the JUnit XML format using the given writer

type Reporter

type Reporter interface {
	GenerateReport([]gucumber.RunnerResult, io.Writer) error
}

Reporter allows to generate a report of the results

Jump to

Keyboard shortcuts

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