Documentation
¶
Index ¶
- func EncodeData(data map[string]interface{}, encodedPath string) (encodedData map[string]interface{}, err error)
- func EncodeItem(item map[string]interface{}) string
- func GenerateRandomPassword() string
- func GenerateRandomString(length int) string
- func RandomString(length int, letters []rune) string
- func TrimString(input string) string
- type FileToSend
- type ServerTestFeature
- func (s *ServerTestFeature) AddDynamicSubstitution(key string, value SubstitutionFunc)
- func (s *ServerTestFeature) AddStaticSubstitution(key, value string)
- func (s *ServerTestFeature) CheckMessageNotEmpty() error
- func (s *ServerTestFeature) CompareFiles(file1, file2, dir string) error
- func (s *ServerTestFeature) CompareFilesForInequality(file1, file2, dir string) error
- func (s *ServerTestFeature) CreateRandomInt()
- func (s *ServerTestFeature) CreateRandomUUID() error
- func (s *ServerTestFeature) DownloadFile(filepath, url string) error
- func (s *ServerTestFeature) DownloadFileViaLink(keyName, downloadDirectory, filename string) error
- func (s *ServerTestFeature) ExtractValueFromResponse(keyName string) error
- func (s *ServerTestFeature) ExtractValueFromResponseAs(keyName, identifier string) error
- func (s *ServerTestFeature) FileShouldExist(filename, directory string) error
- func (s *ServerTestFeature) FileToSendInRequest(filename, directory, key string) error
- func (s *ServerTestFeature) GetWebsocketMessage() error
- func (s *ServerTestFeature) InitializeScenario(ctx *godog.ScenarioContext)
- func (s *ServerTestFeature) MakeGraphQLRequest(endpoint, serviceName, body string) error
- func (s *ServerTestFeature) MakeRequest(method, tenant, service, endpoint string, body *godog.DocString, ...) error
- func (s *ServerTestFeature) OpenWebsocket(endpoint string) error
- func (s *ServerTestFeature) PerformRequest(method, tenant, service, endpoint string, body []byte, ...) error
- func (s *ServerTestFeature) PerformSubstitutions(data []byte) []byte
- func (s *ServerTestFeature) Reset(interface{})
- func (s *ServerTestFeature) ResponseContainsItemAtIndexWithPropertyNotSetToNull(index int, property string) error
- func (s *ServerTestFeature) ResponseContainsItemAtIndexWithPropertyOfLength(index int, property string, length int) error
- func (s *ServerTestFeature) ResponseContainsItemAtIndexWithPropertySetTo(index int, property, value string) error
- func (s *ServerTestFeature) ResponseContainsItemAtIndexWithPropertySetToNull(index int, property string) error
- func (s *ServerTestFeature) ResponseContainsItemWithPropertySetTo(property, value string) error
- func (s *ServerTestFeature) ResponseContainsObjectWithItemAtIndexWithPropertyNotNull(objectName string, index int, property string) error
- func (s *ServerTestFeature) ResponseContainsObjectWithItemAtIndexWithPropertyOfLength(objectName string, index int, property string, length int) error
- func (s *ServerTestFeature) ResponseContainsObjectWithItemAtIndexWithPropertySetTo(objectName string, index int, property, value string) error
- func (s *ServerTestFeature) ResponseContainsObjectWithItemAtIndexWithPropertySetToNull(objectName string, index int, property string) error
- func (s *ServerTestFeature) ResponseContainsObjectWithPropertySetTo(objectName, property, value string) error
- func (a *ServerTestFeature) ResponseShouldContainPropertyWithLength(jsonQueryPath string, length int) error
- func (s *ServerTestFeature) ResponseShouldHaveLength(length int) error
- func (s *ServerTestFeature) SendGQLRequestWithVariables(gqlMethodName string, serviceName string, endpoint string, ...) error
- func (s *ServerTestFeature) SendRequest(method, endpoint string) error
- func (s *ServerTestFeature) SendRequestToService(method, tenant, service, endpoint string) error
- func (s *ServerTestFeature) SendRequestWithData(method, endpoint string, body *godog.DocString) error
- func (s *ServerTestFeature) SendRequestWithDataToService(method, tenant, service, endpoint string, body *godog.DocString) error
- func (s *ServerTestFeature) SendRequestWithEncodedData(method, endpoint, encodedPath string, body *godog.DocString) error
- func (s *ServerTestFeature) SendRequestWithEncodedDataToService(method, tenant, service, endpoint, encodedPath string, body *godog.DocString) error
- func (s *ServerTestFeature) SendRequestWithParams(method, endpoint string, params *godog.DocString) error
- func (s *ServerTestFeature) SendRequestWithParamsToService(method, tenant, service, endpoint string, params *godog.DocString) error
- func (s *ServerTestFeature) SendWebsocketMessage(body *godog.DocString) error
- func (s *ServerTestFeature) SetWebsocketReadTimeout(seconds string) error
- func (s *ServerTestFeature) ShouldNotContainForJsonQueryPath(value, jsonQueryPath string) error
- func (s *ServerTestFeature) SignedInAsA(role string) error
- func (s *ServerTestFeature) TheMessageShouldContainA(key string) error
- func (s *ServerTestFeature) TheMessageShouldNotContainA(key string) error
- func (s *ServerTestFeature) TheResponseCodeShouldBe(statusCode int) error
- func (s *ServerTestFeature) TheResponseHeadersShouldContain(key, value string) error
- func (s *ServerTestFeature) TheResponseShouldContain(body *godog.DocString) error
- func (s *ServerTestFeature) TheResponseShouldContainA(key string) error
- func (s *ServerTestFeature) TheResponseShouldContainAThatIsNotEmpty(jsonQueryPath string) error
- func (s *ServerTestFeature) TheResponseShouldContainAThatIsNotNull(jsonQueryPath string) error
- func (s *ServerTestFeature) TheResponseShouldContainAThatIsNull(jsonQueryPath string) error
- func (s *ServerTestFeature) TheResponseShouldContainATimeSetTo(jsonQueryPath, value string) error
- func (s *ServerTestFeature) TheResponseShouldContainSetTo(property, value string) error
- func (s *ServerTestFeature) TheResponseShouldMatchJSON(body *godog.DocString)
- func (s *ServerTestFeature) TheResponseShouldNotContainA(key string) error
- func (s *ServerTestFeature) UseSecretKey() error
- func (s *ServerTestFeature) WaitForSeconds(seconds int)
- func (s *ServerTestFeature) WebsocketIsConnected() error
- func (s *ServerTestFeature) WebsocketIsNotConnected() error
- type ServerTestSuite
- type Step
- type SubstitutionFunc
- type SuiteConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodeData ¶
func EncodeItem ¶
func GenerateRandomPassword ¶
func GenerateRandomPassword() string
func GenerateRandomString ¶
func RandomString ¶
func TrimString ¶
Types ¶
type FileToSend ¶
type ServerTestFeature ¶
type ServerTestFeature struct { BeforeRequest func(body []byte) Engine *gin.Engine Recorder *httptest.ResponseRecorder Client *resty.Client UDPConn *net.UDPConn WebsocketConn *websocket.Conn WebsocketReadTimeout *time.Duration ServiceClient abstract.AbstractClient PlatformClient platform.Client HTTPResponse *http.Response ResponseString string StatusCode int RandomInt int UUID string SecretKey string Token string ID string UserID int APIKey string Message string Err error DirectoryFilePath string GraphQLOperation string FilesToSend []FileToSend GraphQLResponse map[string]interface{} // contains filtered or unexported fields }
func NewServerTestFeature ¶
func NewServerTestFeature() *ServerTestFeature
func (*ServerTestFeature) AddDynamicSubstitution ¶
func (s *ServerTestFeature) AddDynamicSubstitution(key string, value SubstitutionFunc)
func (*ServerTestFeature) AddStaticSubstitution ¶
func (s *ServerTestFeature) AddStaticSubstitution(key, value string)
func (*ServerTestFeature) CheckMessageNotEmpty ¶
func (s *ServerTestFeature) CheckMessageNotEmpty() error
func (*ServerTestFeature) CompareFiles ¶
func (s *ServerTestFeature) CompareFiles(file1, file2, dir string) error
func (*ServerTestFeature) CompareFilesForInequality ¶
func (s *ServerTestFeature) CompareFilesForInequality(file1, file2, dir string) error
func (*ServerTestFeature) CreateRandomInt ¶
func (s *ServerTestFeature) CreateRandomInt()
func (*ServerTestFeature) CreateRandomUUID ¶
func (s *ServerTestFeature) CreateRandomUUID() error
func (*ServerTestFeature) DownloadFile ¶
func (s *ServerTestFeature) DownloadFile(filepath, url string) error
func (*ServerTestFeature) DownloadFileViaLink ¶
func (s *ServerTestFeature) DownloadFileViaLink(keyName, downloadDirectory, filename string) error
func (*ServerTestFeature) ExtractValueFromResponse ¶
func (s *ServerTestFeature) ExtractValueFromResponse(keyName string) error
func (*ServerTestFeature) ExtractValueFromResponseAs ¶
func (s *ServerTestFeature) ExtractValueFromResponseAs(keyName, identifier string) error
func (*ServerTestFeature) FileShouldExist ¶
func (s *ServerTestFeature) FileShouldExist(filename, directory string) error
func (*ServerTestFeature) FileToSendInRequest ¶
func (s *ServerTestFeature) FileToSendInRequest(filename, directory, key string) error
func (*ServerTestFeature) GetWebsocketMessage ¶
func (s *ServerTestFeature) GetWebsocketMessage() error
func (*ServerTestFeature) InitializeScenario ¶
func (s *ServerTestFeature) InitializeScenario(ctx *godog.ScenarioContext)
func (*ServerTestFeature) MakeGraphQLRequest ¶
func (s *ServerTestFeature) MakeGraphQLRequest(endpoint, serviceName, body string) error
func (*ServerTestFeature) MakeRequest ¶
func (*ServerTestFeature) OpenWebsocket ¶
func (s *ServerTestFeature) OpenWebsocket(endpoint string) error
func (*ServerTestFeature) PerformRequest ¶
func (*ServerTestFeature) PerformSubstitutions ¶
func (s *ServerTestFeature) PerformSubstitutions(data []byte) []byte
func (*ServerTestFeature) Reset ¶
func (s *ServerTestFeature) Reset(interface{})
func (*ServerTestFeature) ResponseContainsItemAtIndexWithPropertyNotSetToNull ¶
func (s *ServerTestFeature) ResponseContainsItemAtIndexWithPropertyNotSetToNull(index int, property string) error
func (*ServerTestFeature) ResponseContainsItemAtIndexWithPropertyOfLength ¶
func (s *ServerTestFeature) ResponseContainsItemAtIndexWithPropertyOfLength(index int, property string, length int) error
func (*ServerTestFeature) ResponseContainsItemAtIndexWithPropertySetTo ¶
func (s *ServerTestFeature) ResponseContainsItemAtIndexWithPropertySetTo(index int, property, value string) error
func (*ServerTestFeature) ResponseContainsItemAtIndexWithPropertySetToNull ¶
func (s *ServerTestFeature) ResponseContainsItemAtIndexWithPropertySetToNull(index int, property string) error
func (*ServerTestFeature) ResponseContainsItemWithPropertySetTo ¶
func (s *ServerTestFeature) ResponseContainsItemWithPropertySetTo(property, value string) error
func (*ServerTestFeature) ResponseContainsObjectWithItemAtIndexWithPropertyNotNull ¶
func (s *ServerTestFeature) ResponseContainsObjectWithItemAtIndexWithPropertyNotNull(objectName string, index int, property string) error
func (*ServerTestFeature) ResponseContainsObjectWithItemAtIndexWithPropertyOfLength ¶
func (*ServerTestFeature) ResponseContainsObjectWithItemAtIndexWithPropertySetTo ¶
func (s *ServerTestFeature) ResponseContainsObjectWithItemAtIndexWithPropertySetTo(objectName string, index int, property, value string) error
func (*ServerTestFeature) ResponseContainsObjectWithItemAtIndexWithPropertySetToNull ¶
func (s *ServerTestFeature) ResponseContainsObjectWithItemAtIndexWithPropertySetToNull(objectName string, index int, property string) error
func (*ServerTestFeature) ResponseContainsObjectWithPropertySetTo ¶
func (s *ServerTestFeature) ResponseContainsObjectWithPropertySetTo(objectName, property, value string) error
func (*ServerTestFeature) ResponseShouldContainPropertyWithLength ¶
func (a *ServerTestFeature) ResponseShouldContainPropertyWithLength(jsonQueryPath string, length int) error
func (*ServerTestFeature) ResponseShouldHaveLength ¶
func (s *ServerTestFeature) ResponseShouldHaveLength(length int) error
func (*ServerTestFeature) SendGQLRequestWithVariables ¶
func (*ServerTestFeature) SendRequest ¶
func (s *ServerTestFeature) SendRequest(method, endpoint string) error
func (*ServerTestFeature) SendRequestToService ¶
func (s *ServerTestFeature) SendRequestToService(method, tenant, service, endpoint string) error
func (*ServerTestFeature) SendRequestWithData ¶
func (s *ServerTestFeature) SendRequestWithData(method, endpoint string, body *godog.DocString) error
func (*ServerTestFeature) SendRequestWithDataToService ¶
func (s *ServerTestFeature) SendRequestWithDataToService(method, tenant, service, endpoint string, body *godog.DocString) error
func (*ServerTestFeature) SendRequestWithEncodedData ¶
func (s *ServerTestFeature) SendRequestWithEncodedData(method, endpoint, encodedPath string, body *godog.DocString) error
func (*ServerTestFeature) SendRequestWithEncodedDataToService ¶
func (s *ServerTestFeature) SendRequestWithEncodedDataToService(method, tenant, service, endpoint, encodedPath string, body *godog.DocString) error
func (*ServerTestFeature) SendRequestWithParams ¶
func (s *ServerTestFeature) SendRequestWithParams(method, endpoint string, params *godog.DocString) error
func (*ServerTestFeature) SendRequestWithParamsToService ¶
func (s *ServerTestFeature) SendRequestWithParamsToService(method, tenant, service, endpoint string, params *godog.DocString) error
func (*ServerTestFeature) SendWebsocketMessage ¶
func (s *ServerTestFeature) SendWebsocketMessage(body *godog.DocString) error
func (*ServerTestFeature) SetWebsocketReadTimeout ¶
func (s *ServerTestFeature) SetWebsocketReadTimeout(seconds string) error
func (*ServerTestFeature) ShouldNotContainForJsonQueryPath ¶
func (s *ServerTestFeature) ShouldNotContainForJsonQueryPath(value, jsonQueryPath string) error
func (*ServerTestFeature) SignedInAsA ¶
func (s *ServerTestFeature) SignedInAsA(role string) error
func (*ServerTestFeature) TheMessageShouldContainA ¶
func (s *ServerTestFeature) TheMessageShouldContainA(key string) error
func (*ServerTestFeature) TheMessageShouldNotContainA ¶
func (s *ServerTestFeature) TheMessageShouldNotContainA(key string) error
func (*ServerTestFeature) TheResponseCodeShouldBe ¶
func (s *ServerTestFeature) TheResponseCodeShouldBe(statusCode int) error
func (*ServerTestFeature) TheResponseHeadersShouldContain ¶
func (s *ServerTestFeature) TheResponseHeadersShouldContain(key, value string) error
func (*ServerTestFeature) TheResponseShouldContain ¶
func (s *ServerTestFeature) TheResponseShouldContain(body *godog.DocString) error
func (*ServerTestFeature) TheResponseShouldContainA ¶
func (s *ServerTestFeature) TheResponseShouldContainA(key string) error
func (*ServerTestFeature) TheResponseShouldContainAThatIsNotEmpty ¶
func (s *ServerTestFeature) TheResponseShouldContainAThatIsNotEmpty(jsonQueryPath string) error
func (*ServerTestFeature) TheResponseShouldContainAThatIsNotNull ¶
func (s *ServerTestFeature) TheResponseShouldContainAThatIsNotNull(jsonQueryPath string) error
func (*ServerTestFeature) TheResponseShouldContainAThatIsNull ¶
func (s *ServerTestFeature) TheResponseShouldContainAThatIsNull(jsonQueryPath string) error
func (*ServerTestFeature) TheResponseShouldContainATimeSetTo ¶
func (s *ServerTestFeature) TheResponseShouldContainATimeSetTo(jsonQueryPath, value string) error
func (*ServerTestFeature) TheResponseShouldContainSetTo ¶
func (s *ServerTestFeature) TheResponseShouldContainSetTo(property, value string) error
func (*ServerTestFeature) TheResponseShouldMatchJSON ¶
func (s *ServerTestFeature) TheResponseShouldMatchJSON(body *godog.DocString)
func (*ServerTestFeature) TheResponseShouldNotContainA ¶
func (s *ServerTestFeature) TheResponseShouldNotContainA(key string) error
func (*ServerTestFeature) UseSecretKey ¶
func (s *ServerTestFeature) UseSecretKey() error
func (*ServerTestFeature) WaitForSeconds ¶
func (s *ServerTestFeature) WaitForSeconds(seconds int)
func (*ServerTestFeature) WebsocketIsConnected ¶
func (s *ServerTestFeature) WebsocketIsConnected() error
func (*ServerTestFeature) WebsocketIsNotConnected ¶
func (s *ServerTestFeature) WebsocketIsNotConnected() error
type ServerTestSuite ¶
type ServerTestSuite struct { EnvFilePath *string Feature *ServerTestFeature Lifecycle string Region string // contains filtered or unexported fields }
func NewSuite ¶
func NewSuite(config *SuiteConfig) *ServerTestSuite
func (*ServerTestSuite) AddSteps ¶
func (s *ServerTestSuite) AddSteps(steps ...Step)
func (*ServerTestSuite) InitializeScenario ¶
func (s *ServerTestSuite) InitializeScenario(ctx *godog.ScenarioContext)
func (*ServerTestSuite) Run ¶
func (s *ServerTestSuite) Run()
type SubstitutionFunc ¶
Click to show internal directories.
Click to hide internal directories.