v2

package
v1.0.159 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var INDENT = "   "

Functions

func GetPrinter

func GetPrinter(printFormat string, verboseMode bool) printer.IPrinter

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"`
	Resources   int               `xml:"resources,attr"`
	Excluded    int               `xml:"excluded,attr"`
	Failed      int               `xml:"filed,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"`
	Time       string          `xml:"time,attr"`
	Name       string          `xml:"name,attr"`
	Resources  int             `xml:"resources,attr"`
	Excluded   int             `xml:"excluded,attr"`
	Failed     int             `xml:"filed,attr"`
	Properties []JUnitProperty `xml:"properties>property,omitempty"`
	TestCases  []JUnitTestCase `xml:"testcase"`
}

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

type JUnitTestSuites

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

type JunitPrinter

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

func NewJunitPrinter

func NewJunitPrinter() *JunitPrinter

func (*JunitPrinter) ActionPrint

func (junitPrinter *JunitPrinter) ActionPrint(opaSessionObj *cautils.OPASessionObj)

func (*JunitPrinter) FinalizeData

func (junitPrinter *JunitPrinter) FinalizeData(opaSessionObj *cautils.OPASessionObj)

func (*JunitPrinter) Score

func (junitPrinter *JunitPrinter) Score(score float32)

func (*JunitPrinter) SetWriter

func (junitPrinter *JunitPrinter) SetWriter(outputFile string)

type SilentPrinter

type SilentPrinter struct {
}

func (*SilentPrinter) ActionPrint

func (silentPrinter *SilentPrinter) ActionPrint(opaSessionObj *cautils.OPASessionObj)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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