saucereport

package
v0.125.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusPassed  = "passed"
	StatusSkipped = "skipped"
	StatusFailed  = "failed"
)

The different states that a job can be in.

View Source
const SauceReportFileName = "sauce-test-report.json"

SauceReportFileName is the name for Sauce Labs report.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attachment

type Attachment struct {
	Name        string `json:"name,omitempty"`
	Path        string `json:"path,omitempty"`
	ContentType string `json:"contentType,omitempty"`
}

Attachment represents an attachment.

type Code

type Code struct {
	Lines []string `json:"lines,omitempty"`
}

Code represents the code of a test.

type Metadata

type Metadata map[string]interface{}

Metadata represents metadata.

type SauceReport

type SauceReport struct {
	Status      string       `json:"status,omitempty"`
	Attachments []Attachment `json:"attachments,omitempty"`
	Suites      []Suite      `json:"suites,omitempty"`
}

SauceReport represents a report generated by Sauce Labs.

func Parse

func Parse(fileContent []byte) (SauceReport, error)

Parse parses an json-encoded byte string and returns a `SauceReport` struct

type Suite

type Suite struct {
	Name        string       `json:"name,omitempty"`
	Status      string       `json:"status,omitempty"`
	Metadata    Metadata     `json:"metadata,omitempty"`
	Suites      []Suite      `json:"suites,omitempty"`
	Attachments []Attachment `json:"attachments,omitempty"`
	Tests       []Test       `json:"tests,omitempty"`
}

Suite represents a suite in a report.

type Test

type Test struct {
	Name           string       `json:"name,omitempty"`
	Status         string       `json:"status,omitempty"`
	StartTime      time.Time    `json:"startTime,omitempty"`
	Duration       int          `json:"duration,omitempty"`
	Attachments    []Attachment `json:"attachments,omitempty"`
	Metadata       Metadata     `json:"metadata,omitempty"`
	Output         string       `json:"output,omitempty"`
	Code           Code         `json:"code,omitempty"`
	VideoTimestamp float64      `json:"VideoTimestamp,omitempty"`
}

Test represents a test in a report.

Jump to

Keyboard shortcuts

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