reportportal

package
v1.2.43-rc6 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateReportLog

func GenerateReportLog()

func GenerateReportXMLFile

func GenerateReportXMLFile() (int, int, map[string][]Testcase, map[string][]Testcase)

func GetExecutedTestCases

func GetExecutedTestCases(testsuite *Testsuite) ([]Testcase, []Testcase, []Testcase)

func ListFiles

func ListFiles(dir string, subfix string) []string

Types

type ErrorMessage

type ErrorMessage struct {
	XMLName  xml.Name `xml:"error"`
	XMLValue string   `xml:",innerxml"`
	Message  string   `xml:"message,attr"`
	Type     string   `xml:"type,attr"`
}

type FailureMessage

type FailureMessage struct {
	XMLName  xml.Name `xml:"failure"`
	XMLValue string   `xml:",innerxml"`
	Message  string   `xml:"message,attr"`
	Type     string   `xml:"type,attr"`
}

type Properties

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

type Property

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

type ReportLog

type ReportLog struct {
	TestSuite        string   `json:"testsuite,omitempty"`
	FailureScenarios []string `json:"failure_scenarios,omitempty"`
}

type ReportLogs

type ReportLogs struct {
	Total    int          `json:"total"`
	Passed   int          `json:"passed"`
	Failures int          `json:"failures"`
	Errors   int          `json:"errors"`
	Reports  []*ReportLog `json:"reports,omitempty"`
}

type TCResult

type TCResult struct {
	ID      string
	Title   string
	Message string
	Tags    []string
}

func PrintTestCase

func PrintTestCase(tc Testcase) *TCResult

type TCStatus

type TCStatus string
const (
	Passed   TCStatus = "passed"
	Skipped  TCStatus = "skipped"
	Failed   TCStatus = "failed"
	Panicked TCStatus = "panicked"
	Pending  TCStatus = "pending"
)

type Testcase

type Testcase struct {
	XMLName   xml.Name        `xml:"testcase"`
	Name      string          `xml:"name,attr"`
	Classname string          `xml:"classname,attr"`
	Status    string          `xml:"status,attr"`
	Time      string          `xml:"time,attr"`
	FM        *FailureMessage `xml:"failure"`
	EM        *ErrorMessage   `xml:"error"`
}

type Testsuite

type Testsuite struct {
	XMLName    xml.Name   `xml:"testsuite"`
	Name       string     `xml:"name,attr"`
	Package    string     `xml:"package,attr"`
	Tests      int        `xml:"tests,attr"`
	Disabled   int        `xml:"disabled,attr"`
	Skipped    int        `xml:"skipped,attr"`
	Errors     int        `xml:"errors,attr"`
	Failures   int        `xml:"failures,attr"`
	Time       float64    `xml:"time,attr"`
	Timestamp  string     `xml:"timestamp,attr"`
	Properties Properties `xml:"properties"`
	TCs        []Testcase `xml:"testcase"`
}

type Testsuites

type Testsuites struct {
	XMLName  xml.Name     `xml:"testsuites"`
	Tests    int          `xml:"tests,attr"`
	Disabled int          `xml:"disabled,attr"`
	Errors   int          `xml:"errors,attr"`
	Failures int          `xml:"failures,attr"`
	Time     float64      `xml:"time,attr"`
	TS       []*Testsuite `xml:"testsuite"`
}

func ParseJunitXML

func ParseJunitXML(fileName string) (*Testsuites, error)

Jump to

Keyboard shortcuts

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