reporting

package
v0.0.0-...-65feeac Latest Latest
Warning

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

Go to latest
Published: Nov 14, 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 AssertionResult

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

func NewErrorReport

func NewErrorReport(err interface{}) *AssertionResult

func NewFailureReport

func NewFailureReport(failure string) *AssertionResult

func NewSkipReport

func NewSkipReport() *AssertionResult

func NewSuccessReport

func NewSuccessReport() *AssertionResult

type FailureView

type FailureView struct {
	Message  string
	Expected string
	Actual   string
}

type Reporter

type Reporter interface {
	BeginStory(story *StoryReport)
	Enter(scope *ScopeReport)
	Report(r *AssertionResult)
	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, name 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