Documentation ¶
Index ¶
- Constants
- func PrintDoubleGroupJson(groupReports map[string]map[string][]Report) error
- func PrintDoubleGroupStdout(groupReport map[string]map[string][]Report) error
- func PrintSingleGroupJson(groupReports map[string][]Report) error
- func PrintSingleGroupStdout(groupReport map[string][]Report) error
- func PrintTripleGroupJson(groupReports map[string]map[string]map[string][]Report) error
- func PrintTripleGroupStdout(groupReport map[string]map[string]map[string][]Report) error
- type JsonReporter
- type JunitReporter
- type Message
- type Property
- type Report
- type Reporter
- type Skipped
- type StdoutReporter
- type SystemErr
- type SystemOut
- type Testcase
- type TestcaseError
- type TestcaseFailure
- type Testsuite
- type Testsuites
Constants ¶
const (
Header = `<?xml version="1.0" encoding="UTF-8"?>` + "\n"
)
Variables ¶
This section is empty.
Functions ¶
func PrintDoubleGroupJson ¶ added in v1.6.0
Prints the report for when two groups are passed in the groupby flag
func PrintDoubleGroupStdout ¶ added in v1.6.0
Prints the report for when two groups are passed in the groupby flag
func PrintSingleGroupJson ¶ added in v1.6.0
Prints the report for when one group is passed in the groupby flag
func PrintSingleGroupStdout ¶ added in v1.6.0
There is repeated code in the following two functions. Trying to consolidate the code into one function is difficult because of the output format
func PrintTripleGroupJson ¶ added in v1.6.0
Prinnts the report for when three groups are passed in the groupby flag
Types ¶
type JsonReporter ¶ added in v1.3.0
type JsonReporter struct {
// contains filtered or unexported fields
}
func NewJsonReporter ¶ added in v1.6.0
func NewJsonReporter(outputDest string) *JsonReporter
func (JsonReporter) Print ¶ added in v1.3.0
func (jr JsonReporter) Print(reports []Report) error
Print implements the Reporter interface by outputting the report content to stdout as JSON if outputDest flag is provided, output results to a file.
type JunitReporter ¶ added in v1.6.0
type JunitReporter struct {
// contains filtered or unexported fields
}
func NewJunitReporter ¶ added in v1.6.0
func NewJunitReporter(outputDest string) *JunitReporter
func (JunitReporter) Print ¶ added in v1.6.0
func (jr JunitReporter) Print(reports []Report) error
type Report ¶
The Report object stores information about the report and the results of the validation
type Reporter ¶
Print accepts an array of Report objects and determines how to output the contents. Output could be stdout, files, etc
type StdoutReporter ¶
type StdoutReporter struct{}
func (StdoutReporter) Print ¶
func (sr StdoutReporter) Print(reports []Report) error
Print implements the Reporter interface by outputting the report content to stdout
type Testcase ¶ added in v1.6.0
type Testcase struct { XMLName xml.Name `xml:"testcase"` Name string `xml:"name,attr"` ClassName string `xml:"classname,attr"` Assertions int `xml:"assertions,attr,omitempty"` Time float32 `xml:"time,attr,omitempty"` File string `xml:"file,attr,omitempty"` Line int `xml:"line,attr,omitempty"` Skipped *Skipped `xml:"skipped,omitempty,omitempty"` Properties *[]Property `xml:"properties>property,omitempty"` TestcaseError *TestcaseError `xml:"error,omitempty"` TestcaseFailure *TestcaseFailure `xml:"failure,omitempty"` }
type TestcaseError ¶ added in v1.6.0
type TestcaseFailure ¶ added in v1.6.0
type Testsuite ¶ added in v1.6.0
type Testsuite struct { XMLName xml.Name `xml:"testsuite"` Name string `xml:"name,attr"` Tests int `xml:"tests,attr,omitempty"` Failures int `xml:"failures,attr,omitempty"` Errors int `xml:"errors,attr,omitempty"` Skipped int `xml:"skipped,attr,omitempty"` Assertions int `xml:"assertions,attr,omitempty"` Time float32 `xml:"time,attr,omitempty"` Timestamp *time.Time `xml:"timestamp,attr,omitempty"` File string `xml:"file,attr,omitempty"` Testcases *[]Testcase `xml:"testcase,omitempty"` Properties *[]Property `xml:"properties>property,omitempty"` SystemOut *SystemOut `xml:"system-out,omitempty"` SystemErr *SystemErr `xml:"system-err,omitempty"` }
type Testsuites ¶ added in v1.6.0
type Testsuites struct { XMLName xml.Name `xml:"testsuites"` Name string `xml:"name,attr,omitempty"` Tests int `xml:"tests,attr,omitempty"` Failures int `xml:"failures,attr,omitempty"` Errors int `xml:"errors,attr,omitempty"` Skipped int `xml:"skipped,attr,omitempty"` Assertions int `xml:"assertions,attr,omitempty"` Time float32 `xml:"time,attr,omitempty"` Timestamp *time.Time `xml:"timestamp,attr,omitempty"` Testsuites []Testsuite `xml:"testsuite"` }
https://github.com/testmoapp/junitxml#basic-junit-xml-structure