reporting

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2013 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package reporting contains internal functionality related to console reporting and output. Although this package has exported names is not intended for public consumption. See the examples package for how to use this project.

Index

Constants

View Source
const CloseJson = "<<<<<" // "⌫"
View Source
const OpenJson = ">>>>>" // "⌦"

Variables

This section is empty.

Functions

func NewDotReporter

func NewDotReporter(out *printing.Printer) *dot

func NewGoTestReporter

func NewGoTestReporter() *gotestReporter

func NewJsonReporter

func NewJsonReporter(out *printing.Printer) *jsonReporter

func NewProblemReporter

func NewProblemReporter(out *printing.Printer) *problem

func NewReporters

func NewReporters(collection ...Reporter) *reporters

func NewStatisticsReporter

func NewStatisticsReporter(out *printing.Printer) *statistics

func NewStoryReporter

func NewStoryReporter(out *printing.Printer) *story

func QuietMode

func QuietMode()

QuiteMode disables all console output symbols. This is only meant to be used for tests that are internal to goconvey where the output is distracting or otherwise not needed in the test output.

Types

type AssertionReport

type AssertionReport struct {
	File    string
	Line    int
	Failure string
	Error   interface{}

	Skipped bool
	// contains filtered or unexported fields
}

func NewErrorReport

func NewErrorReport(err interface{}) *AssertionReport

func NewFailureReport

func NewFailureReport(failure string) *AssertionReport

func NewSkipReport

func NewSkipReport() *AssertionReport

func NewSuccessReport

func NewSuccessReport() *AssertionReport

type AssertionResult

type AssertionResult struct {
	File       string
	Line       int
	Failure    string
	Error      interface{}
	Skipped    bool
	StackTrace string
}

type Reporter

type Reporter interface {
	BeginStory(story *StoryReport)
	Enter(scope *ScopeReport)
	Report(r *AssertionReport)
	Exit()
	EndStory()
}

func BuildDotReporter

func BuildDotReporter() Reporter

func BuildJsonReporter

func BuildJsonReporter() Reporter

func BuildStoryReporter

func BuildStoryReporter() Reporter

type ScopeReport

type ScopeReport struct {
	Title string
	ID    string
	File  string
	Line  int
}

func NewScopeReport

func NewScopeReport(title, id string) *ScopeReport

type ScopeResult

type ScopeResult struct {
	Title      string
	File       string
	Line       int
	Depth      int
	Assertions []AssertionResult
}

type StoryReport

type StoryReport struct {
	Test gotest.T
	Name string
	File string
	Line int
}

func NewStoryReport

func NewStoryReport(test gotest.T) *StoryReport

Jump to

Keyboard shortcuts

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