Documentation
¶
Index ¶
- type GowrightMock
- type GowrightTestSuite
- type TestifyAssertion
- func (ta *TestifyAssertion) Assert() *assert.Assertions
- func (ta *TestifyAssertion) Contains(s, contains string, msgAndArgs ...interface{}) bool
- func (ta *TestifyAssertion) Empty(object interface{}, msgAndArgs ...interface{}) bool
- func (ta *TestifyAssertion) Equal(expected, actual interface{}, msgAndArgs ...interface{}) bool
- func (ta *TestifyAssertion) Error(err error, msgAndArgs ...interface{}) bool
- func (ta *TestifyAssertion) False(value bool, msgAndArgs ...interface{}) bool
- func (ta *TestifyAssertion) Len(object interface{}, length int, msgAndArgs ...interface{}) bool
- func (ta *TestifyAssertion) Nil(value interface{}, msgAndArgs ...interface{}) bool
- func (ta *TestifyAssertion) NoError(err error, msgAndArgs ...interface{}) bool
- func (ta *TestifyAssertion) NotContains(s, contains string, msgAndArgs ...interface{}) bool
- func (ta *TestifyAssertion) NotEmpty(object interface{}, msgAndArgs ...interface{}) bool
- func (ta *TestifyAssertion) NotEqual(expected, actual interface{}, msgAndArgs ...interface{}) bool
- func (ta *TestifyAssertion) NotNil(value interface{}, msgAndArgs ...interface{}) bool
- func (ta *TestifyAssertion) Require() *require.Assertions
- func (ta *TestifyAssertion) RequireEqual(expected, actual interface{}, msgAndArgs ...interface{})
- func (ta *TestifyAssertion) RequireNoError(err error, msgAndArgs ...interface{})
- func (ta *TestifyAssertion) RequireNotNil(value interface{}, msgAndArgs ...interface{})
- func (ta *TestifyAssertion) True(value bool, msgAndArgs ...interface{}) bool
- type TestifyIntegrationHelper
- func (h *TestifyIntegrationHelper) Close() error
- func (h *TestifyIntegrationHelper) RunAPITest(test *core.APITest) *core.TestCaseResult
- func (h *TestifyIntegrationHelper) RunDatabaseTest(test *core.DatabaseTest) *core.TestCaseResult
- func (h *TestifyIntegrationHelper) RunIntegrationTest(test *core.IntegrationTest) *core.TestCaseResult
- func (h *TestifyIntegrationHelper) RunUITest(test *core.UITest) *core.TestCaseResult
- type UITesterMock
- func (m *UITesterMock) Cleanup() error
- func (m *UITesterMock) Click(selector string) error
- func (m *UITesterMock) ExecuteTest(test *core.UITest) *core.TestCaseResult
- func (m *UITesterMock) GetName() string
- func (m *UITesterMock) GetPageSource() (string, error)
- func (m *UITesterMock) GetText(selector string) (string, error)
- func (m *UITesterMock) Initialize(config interface{}) error
- func (m *UITesterMock) Navigate(url string) error
- func (m *UITesterMock) TakeScreenshot(filename string) (string, error)
- func (m *UITesterMock) Type(selector, text string) error
- func (m *UITesterMock) WaitForElement(selector string, timeout time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GowrightMock ¶
GowrightMock extends testify mock with Gowright-specific functionality
func NewGowrightMock ¶
func NewGowrightMock(testName string) *GowrightMock
NewGowrightMock creates a new Gowright mock instance
func (*GowrightMock) AssertExpectations ¶
func (m *GowrightMock) AssertExpectations(t mock.TestingT) bool
AssertExpectations asserts that all expectations were met and logs the result
func (*GowrightMock) GetLogs ¶
func (m *GowrightMock) GetLogs() []string
GetLogs returns all log entries from the mock
func (*GowrightMock) GetTestName ¶
func (m *GowrightMock) GetTestName() string
GetTestName returns the test name associated with this mock
func (*GowrightMock) Log ¶
func (m *GowrightMock) Log(message string)
Log adds a log entry to the mock
type GowrightTestSuite ¶
GowrightTestSuite provides a testify suite integration for Gowright tests
func (*GowrightTestSuite) GetGowright ¶
func (suite *GowrightTestSuite) GetGowright() *core.Gowright
GetGowright returns the Gowright instance for use in tests
func (*GowrightTestSuite) NewTestifyAssertion ¶
func (suite *GowrightTestSuite) NewTestifyAssertion(testName string) *TestifyAssertion
NewTestifyAssertion creates a new testify assertion instance for the suite
func (*GowrightTestSuite) SetupSuite ¶
func (suite *GowrightTestSuite) SetupSuite()
SetupSuite initializes the Gowright framework for the test suite
func (*GowrightTestSuite) TearDownSuite ¶
func (suite *GowrightTestSuite) TearDownSuite()
TearDownSuite cleans up the Gowright framework after the test suite
type TestifyAssertion ¶
type TestifyAssertion struct {
*core.TestAssertion
// contains filtered or unexported fields
}
TestifyAssertion provides testify-compatible assertion methods with Gowright integration
func NewTestifyAssertion ¶
func NewTestifyAssertion(t testing.TB, testName string) *TestifyAssertion
NewTestifyAssertion creates a new testify-compatible assertion instance
func (*TestifyAssertion) Assert ¶
func (ta *TestifyAssertion) Assert() *assert.Assertions
Assert returns the underlying testify assert instance for direct access
func (*TestifyAssertion) Contains ¶
func (ta *TestifyAssertion) Contains(s, contains string, msgAndArgs ...interface{}) bool
Contains asserts that the string contains the substring using testify and records the result
func (*TestifyAssertion) Empty ¶
func (ta *TestifyAssertion) Empty(object interface{}, msgAndArgs ...interface{}) bool
Empty asserts that the object is empty using testify and records the result
func (*TestifyAssertion) Equal ¶
func (ta *TestifyAssertion) Equal(expected, actual interface{}, msgAndArgs ...interface{}) bool
Equal asserts that two values are equal using testify and records the result
func (*TestifyAssertion) Error ¶
func (ta *TestifyAssertion) Error(err error, msgAndArgs ...interface{}) bool
Error asserts that the error is not nil using testify and records the result
func (*TestifyAssertion) False ¶
func (ta *TestifyAssertion) False(value bool, msgAndArgs ...interface{}) bool
False asserts that the value is false using testify and records the result
func (*TestifyAssertion) Len ¶
func (ta *TestifyAssertion) Len(object interface{}, length int, msgAndArgs ...interface{}) bool
Len asserts that the object has the expected length using testify and records the result
func (*TestifyAssertion) Nil ¶
func (ta *TestifyAssertion) Nil(value interface{}, msgAndArgs ...interface{}) bool
Nil asserts that the value is nil using testify and records the result
func (*TestifyAssertion) NoError ¶
func (ta *TestifyAssertion) NoError(err error, msgAndArgs ...interface{}) bool
NoError asserts that the error is nil using testify and records the result
func (*TestifyAssertion) NotContains ¶
func (ta *TestifyAssertion) NotContains(s, contains string, msgAndArgs ...interface{}) bool
NotContains asserts that the string does not contain the substring using testify and records the result
func (*TestifyAssertion) NotEmpty ¶
func (ta *TestifyAssertion) NotEmpty(object interface{}, msgAndArgs ...interface{}) bool
NotEmpty asserts that the object is not empty using testify and records the result
func (*TestifyAssertion) NotEqual ¶
func (ta *TestifyAssertion) NotEqual(expected, actual interface{}, msgAndArgs ...interface{}) bool
NotEqual asserts that two values are not equal using testify and records the result
func (*TestifyAssertion) NotNil ¶
func (ta *TestifyAssertion) NotNil(value interface{}, msgAndArgs ...interface{}) bool
NotNil asserts that the value is not nil using testify and records the result
func (*TestifyAssertion) Require ¶
func (ta *TestifyAssertion) Require() *require.Assertions
Require returns the underlying testify require instance for direct access
func (*TestifyAssertion) RequireEqual ¶
func (ta *TestifyAssertion) RequireEqual(expected, actual interface{}, msgAndArgs ...interface{})
RequireEqual asserts that two values are equal and fails the test immediately if not
func (*TestifyAssertion) RequireNoError ¶
func (ta *TestifyAssertion) RequireNoError(err error, msgAndArgs ...interface{})
RequireNoError asserts that the error is nil and fails the test immediately if not
func (*TestifyAssertion) RequireNotNil ¶
func (ta *TestifyAssertion) RequireNotNil(value interface{}, msgAndArgs ...interface{})
RequireNotNil asserts that the value is not nil and fails the test immediately if it is
func (*TestifyAssertion) True ¶
func (ta *TestifyAssertion) True(value bool, msgAndArgs ...interface{}) bool
True asserts that the value is true using testify and records the result
type TestifyIntegrationHelper ¶
type TestifyIntegrationHelper struct {
// contains filtered or unexported fields
}
TestifyIntegrationHelper provides helper methods for integrating Gowright with Go's testing package
func NewTestifyIntegrationHelper ¶
func NewTestifyIntegrationHelper(t *testing.T, config *config.Config) (*TestifyIntegrationHelper, error)
NewTestifyIntegrationHelper creates a new integration helper
func (*TestifyIntegrationHelper) Close ¶
func (h *TestifyIntegrationHelper) Close() error
Close cleans up the integration helper
func (*TestifyIntegrationHelper) RunAPITest ¶
func (h *TestifyIntegrationHelper) RunAPITest(test *core.APITest) *core.TestCaseResult
RunAPITest runs an API test with testify integration
func (*TestifyIntegrationHelper) RunDatabaseTest ¶
func (h *TestifyIntegrationHelper) RunDatabaseTest(test *core.DatabaseTest) *core.TestCaseResult
RunDatabaseTest runs a database test with testify integration
func (*TestifyIntegrationHelper) RunIntegrationTest ¶
func (h *TestifyIntegrationHelper) RunIntegrationTest(test *core.IntegrationTest) *core.TestCaseResult
RunIntegrationTest runs an integration test with testify integration
func (*TestifyIntegrationHelper) RunUITest ¶
func (h *TestifyIntegrationHelper) RunUITest(test *core.UITest) *core.TestCaseResult
RunUITest runs a UI test with testify integration
type UITesterMock ¶
type UITesterMock struct {
*GowrightMock
}
UITesterMock provides a mock implementation of UITester for testing
func NewUITesterMock ¶
func NewUITesterMock(testName string) *UITesterMock
NewUITesterMock creates a new UITester mock
func (*UITesterMock) Cleanup ¶
func (m *UITesterMock) Cleanup() error
Cleanup mocks the Cleanup method
func (*UITesterMock) Click ¶
func (m *UITesterMock) Click(selector string) error
Click mocks the Click method
func (*UITesterMock) ExecuteTest ¶
func (m *UITesterMock) ExecuteTest(test *core.UITest) *core.TestCaseResult
ExecuteTest mocks the ExecuteTest method
func (*UITesterMock) GetName ¶
func (m *UITesterMock) GetName() string
GetName mocks the GetName method
func (*UITesterMock) GetPageSource ¶
func (m *UITesterMock) GetPageSource() (string, error)
GetPageSource mocks the GetPageSource method
func (*UITesterMock) GetText ¶
func (m *UITesterMock) GetText(selector string) (string, error)
GetText mocks the GetText method
func (*UITesterMock) Initialize ¶
func (m *UITesterMock) Initialize(config interface{}) error
Initialize mocks the Initialize method
func (*UITesterMock) Navigate ¶
func (m *UITesterMock) Navigate(url string) error
Navigate mocks the Navigate method
func (*UITesterMock) TakeScreenshot ¶
func (m *UITesterMock) TakeScreenshot(filename string) (string, error)
TakeScreenshot mocks the TakeScreenshot method
func (*UITesterMock) Type ¶
func (m *UITesterMock) Type(selector, text string) error
Type mocks the Type method
func (*UITesterMock) WaitForElement ¶
func (m *UITesterMock) WaitForElement(selector string, timeout time.Duration) error
WaitForElement mocks the WaitForElement method