report

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileWriteThroughReport

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

FileWriteThroughReport is an empty struct that serves to pass GoDog's writes directly to a file.

func (*FileWriteThroughReport) Process

func (s *FileWriteThroughReport) Process() error

Process does nothing here. It simply implements the Report interface.

func (*FileWriteThroughReport) Write

func (s *FileWriteThroughReport) Write(b []byte) (int, error)

type HTMLReport

type HTMLReport struct {
	Features        []cukeFeature
	ProjectName     string
	AppVersion      string
	Environment     string
	Browser         string
	Platform        string
	RunTime         time.Duration
	OS              string
	Timestamp       string
	ElementsPassed  int
	ElementsFailed  int
	ElementsPending int
	StepsPassed     int
	StepsFailed     int
	StepsPending    int
	StepsSkipped    int
	TotalElements   int
	TotalSteps      int
	// contains filtered or unexported fields
}

HTMLReport holds the jsonResults of a test execution

func (*HTMLReport) Process

func (r *HTMLReport) Process() error

Process marshalls the `jsonResults` into structs and analyzes the results to generate metrics such as `StepsPassed`, `StepsFailed`, etc.

func (*HTMLReport) Write

func (r *HTMLReport) Write(p []byte) (int, error)

Write implements the io.Writer interface for the JSONReport struct. This allows JSONReport to be the Output stream for GoDog.

type Report

type Report interface {
	Write(p []byte) (int, error)
	Process() error
}

Report is a struct that receives data from GoDog via the `Write` method. Depending on the report type, it will either pass through the data to its final destination or cache it, format it, and then write it out when the Process() method is called.

func NewReport

func NewReport(s *config.Settings, f *fs.Fs) Report

NewReport is a factory method that creates the appropriate `Report` object based on the system's settings.

type StdOutWriteThroughReport

type StdOutWriteThroughReport struct{}

StdOutWriteThroughReport is an empty struct that serves to pass GoDog's writes directly to StdOut.

func (*StdOutWriteThroughReport) Process

func (s *StdOutWriteThroughReport) Process() error

Process does nothing here. It simply implements the Report interface.

func (*StdOutWriteThroughReport) Write

func (s *StdOutWriteThroughReport) Write(b []byte) (int, error)

Jump to

Keyboard shortcuts

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