Documentation ¶
Index ¶
- func Bluef(msg string, args ...interface{}) string
- func DarkF(msg string, args ...interface{}) string
- func Grayf(msg string, args ...interface{}) string
- func Greenf(msg string, args ...interface{}) string
- func LightCyanf(msg string, args ...interface{}) string
- func LightGreenf(msg string, args ...interface{}) string
- func LightRedf(msg string, args ...interface{}) string
- func Magentaf(msg string, args ...interface{}) string
- func Redf(msg string, args ...interface{}) string
- func StripSecrets(text string) string
- func Yellowf(msg string, args ...interface{}) string
- type JUnitFailure
- type JUnitProperty
- type JUnitSkipMessage
- type JUnitTestCase
- type JUnitTestSuite
- type JUnitTestSuites
- type Progress
- type TestResults
- func (c *TestResults) Append(other *TestResults)
- func (c *TestResults) Debugf(s string, args ...interface{})
- func (c *TestResults) Done()
- func (c *TestResults) Errorf(s string, args ...interface{})
- func (c *TestResults) Failf(name, msg string, args ...interface{})
- func (c *TestResults) Infof(s string, args ...interface{})
- func (c *TestResults) Passf(name, msg string, args ...interface{})
- func (c *TestResults) Printf(s string, args ...interface{})
- func (c *TestResults) Println(s string)
- func (c *TestResults) Retry()
- func (c *TestResults) Skipf(name, msg string, args ...interface{})
- func (c TestResults) String() string
- func (c *TestResults) SuiteName(name string) *TestResults
- func (c TestResults) ToXML() (string, error)
- func (c *TestResults) Tracef(s string, args ...interface{})
- func (c *TestResults) Warnf(s string, args ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LightCyanf ¶
LightCyanf prints and formats msg as light cyan text
func LightGreenf ¶
LightGreenf prints and formats msg as light green text
func StripSecrets ¶
StripSecrets takes a YAML or INI formatted text and removes any potentially secret data as denoted by keys containing "pass" or "secret" or exact matches for "key" the last character of the secret is kept to aid in troubleshooting
Types ¶
type JUnitFailure ¶
type JUnitFailure struct { Message string `xml:"message,attr"` Type string `xml:"type,attr"` Contents string `xml:",chardata"` }
JUnitFailure contains data related to a failed test.
type JUnitProperty ¶
JUnitProperty represents a key/value pair used to define properties.
type JUnitSkipMessage ¶
type JUnitSkipMessage struct {
Message string `xml:"message,attr"`
}
JUnitSkipMessage contains the reason why a testcase was skipped.
type JUnitTestCase ¶
type JUnitTestCase struct { XMLName xml.Name `xml:"testcase"` Classname string `xml:"classname,attr"` Name string `xml:"name,attr"` Time string `xml:"time,attr"` SkipMessage *JUnitSkipMessage `xml:"skipped,omitempty"` Failure *JUnitFailure `xml:"failure,omitempty"` }
JUnitTestCase is a single test case with its result.
type JUnitTestSuite ¶
type JUnitTestSuite struct { XMLName xml.Name `xml:"testsuite"` Tests int `xml:"tests,attr"` Failures int `xml:"failures,attr"` Time string `xml:"time,attr"` Name string `xml:"name,attr"` Properties []JUnitProperty `xml:"properties>property,omitempty"` TestCases []JUnitTestCase `xml:"testcase"` }
JUnitTestSuite is a single JUnit test suite which may contain many testcases.
type JUnitTestSuites ¶
type JUnitTestSuites struct { XMLName xml.Name `xml:"testsuites"` Suites []JUnitTestSuite `xml:"testsuite"` }
JUnitTestSuites is a collection of JUnit test suites.
func (JUnitTestSuites) ToXML ¶
func (suites JUnitTestSuites) ToXML() (string, error)
type Progress ¶ added in v1.2.0
type Progress interface { Done() Status(status string) Start() }
func NewTerminalProgress ¶ added in v1.2.0
func NewTerminalProgress(name string, localTest *TestResults, progress *mpb.Progress) Progress
func NewTextProgress ¶ added in v1.2.0
func NewTextProgress(name string, localTest *TestResults) Progress
type TestResults ¶
type TestResults struct { PassCount int FailCount int SkipCount int Tests []JUnitTestCase Name string Writer io.Writer Retries int }
TestResults contains the status of testing
func NewTestResults ¶ added in v1.2.0
func NewTestResults(name string, writer io.Writer) TestResults
func (*TestResults) Append ¶ added in v1.2.0
func (c *TestResults) Append(other *TestResults)
func (*TestResults) Debugf ¶ added in v1.2.0
func (c *TestResults) Debugf(s string, args ...interface{})
func (*TestResults) Errorf ¶ added in v1.2.0
func (c *TestResults) Errorf(s string, args ...interface{})
func (*TestResults) Failf ¶
func (c *TestResults) Failf(name, msg string, args ...interface{})
Failf reports a new failing test
func (*TestResults) Infof ¶ added in v1.2.0
func (c *TestResults) Infof(s string, args ...interface{})
func (*TestResults) Passf ¶
func (c *TestResults) Passf(name, msg string, args ...interface{})
Passf reports a new passing test
func (*TestResults) Printf ¶ added in v1.2.0
func (c *TestResults) Printf(s string, args ...interface{})
func (*TestResults) Println ¶ added in v1.2.0
func (c *TestResults) Println(s string)
func (*TestResults) Retry ¶ added in v1.2.0
func (c *TestResults) Retry()
func (*TestResults) Skipf ¶
func (c *TestResults) Skipf(name, msg string, args ...interface{})
Skipf reports a new skipped test
func (TestResults) String ¶
func (c TestResults) String() string
func (*TestResults) SuiteName ¶
func (c *TestResults) SuiteName(name string) *TestResults
func (TestResults) ToXML ¶
func (c TestResults) ToXML() (string, error)
func (*TestResults) Tracef ¶ added in v1.2.0
func (c *TestResults) Tracef(s string, args ...interface{})
func (*TestResults) Warnf ¶ added in v1.2.0
func (c *TestResults) Warnf(s string, args ...interface{})