junit

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Failure

type Failure struct {
	Message     string `xml:"message,attr,omitempty"`
	Description string `xml:",chardata"`
	Type        string `xml:"type,attr"`
}

type JUnitReport

type JUnitReport struct {
	XMLName    xml.Name    `xml:"testsuites"`
	TestSuites []TestSuite `xml:"testsuite"`
}

func EncodeComplianceReport

func EncodeComplianceReport(report parser.ScanReport) JUnitReport

EncodeComplianceReport accepts a single ScanReport and returns a JUnitReport for compliances

func EncodeScanReport

func EncodeScanReport(report parser.ScanReport) JUnitReport

EncodeScanReport accepts a single ScanReport and returns a JUnitReport

func EncodeVulnerabilityReport

func EncodeVulnerabilityReport(report parser.ScanReport) JUnitReport

EncodeVulnerabilityReport accepts a single ScanReport and returns a JUnitReport for vulnerabilities

type Property

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

type Skipped

type Skipped struct {
	Message     string `xml:"message,attr,omitempty"`
	Description string `xml:",chardata"`
}

type TestCase

type TestCase struct {
	XMLName   xml.Name `xml:"testcase"`
	Name      string   `xml:"name,attr"`
	ClassName string   `xml:"classname,attr"`
	Time      float64  `xml:"time,attr"`
	Skipped   *Skipped `xml:"skipped,omitempty"`
	Failure   *Failure `xml:"failure,omitempty"`
}

type TestSuite

type TestSuite struct {
	XMLName    xml.Name   `xml:"testsuite"`
	Id         int        `xml:"id,attr"`
	Name       string     `xml:"name,attr"`
	Errors     int        `xml:"errors,attr"`
	Failures   int        `xml:"failures,attr"`
	Skipped    int        `xml:"skipped,attr"`
	Tests      int        `xml:"tests,attr"`
	Hostname   string     `xml:"hostname,attr"`
	Time       float64    `xml:"time,attr"`
	Timestamp  string     `xml:"timestamp,attr"`
	Package    string     `xml:"package,attr"`
	Properties []Property `xml:"properties>property"`
	TestCases  []TestCase `xml:"testcase"`
	SystemOut  string     `xml:"system-out"`
	SystemErr  string     `xml:"system-err"`
}

Jump to

Keyboard shortcuts

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