Documentation ¶
Index ¶
- Variables
- type BehaviorDriven
- type Case
- type HTTPMatcher
- type HttpResponse
- type JUnitMessage
- type JUnitProperty
- type JUnitStderr
- type JUnitStdout
- type JUnitTestCase
- type JUnitTestSuite
- type JUnitTestSuites
- type Matcher
- func (m *Matcher) Contains(s, contains interface{}, msgAndArgs ...interface{})
- func (m *Matcher) Done()
- func (m *Matcher) Empty(object interface{}, msgAndArgs ...interface{})
- func (m *Matcher) Equal(expected, actual interface{}, msgAndArgs ...interface{})
- func (m *Matcher) Fail(msg ...string)
- func (m *Matcher) Failed() bool
- func (m *Matcher) Failf(format string, args ...interface{})
- func (m *Matcher) False(value bool, msgAndArgs ...interface{})
- func (m *Matcher) FileExists(path string, msgANdArgs ...interface{})
- func (m *Matcher) Len(object interface{}, len int, msgAndArgs ...interface{})
- func (m *Matcher) Log(msg string)
- func (m *Matcher) Logf(format string, args ...interface{})
- func (m *Matcher) Must(err error) bool
- func (m *Matcher) NoError(err error, msg ...string)
- func (m *Matcher) NotEmpty(object interface{}, msgAndArgs ...interface{})
- func (m *Matcher) NotNil(object interface{}, msg ...string)
- func (m *Matcher) True(value bool, msgAndArgs ...interface{})
- type MockServer
- type MockTCPServer
- type Scenario
- func (f *Scenario) AfterAll(fn func(m *Matcher))
- func (f *Scenario) AfterEach(fn func(m *Matcher))
- func (f *Scenario) BeforeAll(fn func(m *Matcher))
- func (f *Scenario) BeforeEach(fn func(m *Matcher))
- func (f *Scenario) Context(name string, fn func(s *Scenario))
- func (f *Scenario) Defer(fn func())
- func (f *Scenario) It(name string, fn func(m *Matcher))
- func (f *Scenario) SAfterAll(fn func(m *Matcher))
- func (f *Scenario) SAfterEach(fn func(m *Matcher))
- func (f *Scenario) SBeforeAll(fn func(m *Matcher))
- func (f *Scenario) SBeforeEach(fn func(m *Matcher))
- func (f *Scenario) SSubject(fn func(m *Matcher))
- func (f *Scenario) Step(name string, fn func(s *Scenario))
- func (f *Scenario) Subject(fn func(m *Matcher))
- type Tracker
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultTracker = &Tracker{}
Functions ¶
This section is empty.
Types ¶
type BehaviorDriven ¶
type BehaviorDriven struct {
// contains filtered or unexported fields
}
func (*BehaviorDriven) Describe ¶
func (b *BehaviorDriven) Describe(name string, fn func(s *Scenario))
func (*BehaviorDriven) Execute ¶
func (b *BehaviorDriven) Execute(format string)
type HTTPMatcher ¶
type HTTPMatcher struct {
// contains filtered or unexported fields
}
func (*HTTPMatcher) LastResponse ¶
func (m *HTTPMatcher) LastResponse() *HttpResponse
func (*HTTPMatcher) ResetConnection ¶
func (m *HTTPMatcher) ResetConnection()
func (*HTTPMatcher) SetLastResponse ¶
func (m *HTTPMatcher) SetLastResponse(res *http.Response, err error)
func (*HTTPMatcher) StatusCode ¶
func (m *HTTPMatcher) StatusCode(code int, msgAndArgs ...interface{})
type HttpResponse ¶
func (*HttpResponse) FindCookie ¶
func (h *HttpResponse) FindCookie(name string) *http.Cookie
type JUnitMessage ¶
type JUnitMessage struct {
Message string `xml:"message,attr"`
}
type JUnitProperty ¶
type JUnitStderr ¶
type JUnitStdout ¶
type JUnitTestCase ¶
type JUnitTestCase struct { XMLName xml.Name `xml:"testcase"` // Name of the test case Name string `xml:"name,attr"` // Assertions is the number of assertions in this test case Assertions int `xml:"assertions,attr,omitempty"` ClassName string `xml:"classname,attr"` Status string `xml:"status,attr,omitempty"` // Time in seconds to execute the test case Time int `xml:"time,attr,omitempty"` Skipped *JUnitMessage Error *JUnitMessage Failure *JUnitMessage Stdout *JUnitStdout Stderr *JUnitStderr }
type JUnitTestSuite ¶
type JUnitTestSuite struct { XMLName xml.Name `xml:"testsuite"` Name string `xml:"name,attr,omitempty"` // Tests is total number of tests in the suite. This value is required. Tests int `xml:"tests,attr"` // Failures is total number of failed tests in the suite Failures int `xml:"failures,attr,omitempty"` // Errors is total number of tests in the suite that is with error result Errors int `xml:"errors,attr,omitempty"` // Disabled is total number of disabled tests in the suite Disabled int `xml:"disabled,attr,omitempty"` // Time in seconds to execute in the suite Time int `xml:"time,attr,omitempty"` // Timestamp when tests were executed. The format is ISO8601 (2014-01-21T16:17:18) Timestamp string `xml:"timestamp,attr,omitempty"` // Hostname that tests were executed Hostname string `xml:"hostname,attr,omitempty"` Properties []JUnitProperty `xml:"properties>property,omitempty"` TestCases []JUnitTestCase `xml:"testcase"` }
type JUnitTestSuites ¶
type JUnitTestSuites struct { XMLName xml.Name `xml:"testsuites"` TestSuites []JUnitTestSuite `xml:"testsuite"` Name string `xml:"name,attr,omitempty"` // Tests is total number of tests from all suites Tests int `xml:"tests,attr,omitempty"` // Errors is total number of tests with error result from all suites Errors int `xml:"errors,attr,omitempty"` // Failures is total number of failed tests from all suites Failures int `xml:"failures,attr,omitempty"` // Disabled is total number of disabled tests from all suites Disabled int `xml:"disabled,attr,omitempty"` // Time in seconds to execute all test suites Time int `xml:"time,attr,omitempty"` }
func NewJUnitTestSuites ¶
func NewJUnitTestSuites(tracker *Tracker) *JUnitTestSuites
type Matcher ¶
type Matcher struct { *HTTPMatcher T testingT // contains filtered or unexported fields }
func (*Matcher) Contains ¶
func (m *Matcher) Contains(s, contains interface{}, msgAndArgs ...interface{})
func (*Matcher) Equal ¶
func (m *Matcher) Equal(expected, actual interface{}, msgAndArgs ...interface{})
func (*Matcher) FileExists ¶
type MockServer ¶
type MockServer struct { Port int // contains filtered or unexported fields }
func NewMockServer ¶
func NewMockServer() (*MockServer, error)
func (*MockServer) Requests ¶
func (s *MockServer) Requests() []*http.Request
func (*MockServer) Start ¶
func (s *MockServer) Start() error
func (*MockServer) Stop ¶
func (s *MockServer) Stop() error
type MockTCPServer ¶
type MockTCPServer struct { Port int // contains filtered or unexported fields }
func NewMockTCPServer ¶
func NewMockTCPServer() (*MockTCPServer, error)
func (*MockTCPServer) Start ¶
func (s *MockTCPServer) Start() error
func (*MockTCPServer) Stop ¶
func (s *MockTCPServer) Stop() error
type Scenario ¶
type Scenario struct { Name string // contains filtered or unexported fields }
func NewScenario ¶
func (*Scenario) BeforeEach ¶
func (*Scenario) SAfterEach ¶
func (*Scenario) SBeforeAll ¶
func (*Scenario) SBeforeEach ¶
Click to show internal directories.
Click to hide internal directories.