Documentation ¶
Overview ¶
Package testreporter provides the utilities to capture, report, and log test results.
Index ¶
- type TestResult
- type TestResults
- func (trs *TestResults) AddTestResult(testResult TestResult)
- func (trs *TestResults) ExportResultToCSV(filePath string)
- func (trs *TestResults) ExportResultToHTML(filePath string)
- func (trs *TestResults) ExportResultToJSON(filePath string)
- func (trs *TestResults) ExportResultToMarkdown(filePath string)
- func (trs *TestResults) GenerateTabularResult()
- func (trs *TestResults) PrintSummary()
- func (trs *TestResults) PrintTabularResult()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TestResult ¶
type TestResult struct { Name string `json:"name"` Method string `json:"method"` Args [][]interface{} `json:"args"` Result []interface{} `json:"result"` Errors []error `json:"errors"` NumberOfTestsRan int `json:"numberOfTestsRan"` NumberOfTestsPassed int `json:"numberOfTestsPassed"` NumberOfTestsFailed int `json:"numberOfTestsFailed"` }
func (*TestResult) Fail ¶
func (tr *TestResult) Fail(args []interface{}, result interface{}, err error)
func (*TestResult) Pass ¶
func (tr *TestResult) Pass(args []interface{}, result interface{}, err error)
type TestResults ¶
type TestResults struct { Tests []TestResult TableWriter table.Writer }
func (*TestResults) AddTestResult ¶
func (trs *TestResults) AddTestResult(testResult TestResult)
func (*TestResults) ExportResultToCSV ¶
func (trs *TestResults) ExportResultToCSV(filePath string)
func (*TestResults) ExportResultToHTML ¶
func (trs *TestResults) ExportResultToHTML(filePath string)
func (*TestResults) ExportResultToJSON ¶
func (trs *TestResults) ExportResultToJSON(filePath string)
func (*TestResults) ExportResultToMarkdown ¶
func (trs *TestResults) ExportResultToMarkdown(filePath string)
func (*TestResults) GenerateTabularResult ¶
func (trs *TestResults) GenerateTabularResult()
func (*TestResults) PrintSummary ¶
func (trs *TestResults) PrintSummary()
func (*TestResults) PrintTabularResult ¶
func (trs *TestResults) PrintTabularResult()
Click to show internal directories.
Click to hide internal directories.