Documentation
¶
Index ¶
- func EncodeData(data map[string]interface{}, encodedPath string) (encodedData map[string]interface{}, err error)
- func EncodeItem(item map[string]interface{}) string
- func GenerateRandomString(length int) string
- func RandomString(length int, letters []rune) string
- func TrimString(input string) string
- type ServerTestFeature
- func (s *ServerTestFeature) AddDynamicSubstitution(key string, value SubstitutionFunc)
- func (s *ServerTestFeature) AddStaticSubstitution(key, value string)
- func (s *ServerTestFeature) ExtractValueFromResponse(keyName string) error
- func (s *ServerTestFeature) FileToSendInRequest(filename, directory, key string) error
- func (s *ServerTestFeature) InitializeScenario(ctx *godog.ScenarioContext)
- func (s *ServerTestFeature) MakeRequest(method string, endpoint string, body *godog.DocString)
- func (s *ServerTestFeature) PerformRequest(method, endpoint string, body []byte)
- func (s *ServerTestFeature) Reset(interface{})
- func (s *ServerTestFeature) SendGQLRequestWithVariables(gqlMethodName string, serviceName string, endpoint string, ...) error
- func (s *ServerTestFeature) SendRequest(method, endpoint string)
- func (s *ServerTestFeature) SendRequestWithData(method string, endpoint string, body *godog.DocString)
- func (s *ServerTestFeature) SetFilePath(filename string, directory string) error
- func (s *ServerTestFeature) ShouldNotContainForJsonQueryPath(value, jsonQueryPath string) error
- func (s *ServerTestFeature) TheResponseCodeShouldBe(statusCode int) error
- func (s *ServerTestFeature) TheResponseHeadersShouldContain(key, value string)
- func (s *ServerTestFeature) TheResponseShouldContain(body *godog.DocString)
- func (s *ServerTestFeature) TheResponseShouldContainA(key string)
- func (s *ServerTestFeature) TheResponseShouldContainAThatIsNotNull(jsonQueryPath string) error
- func (s *ServerTestFeature) TheResponseShouldContainSetTo(property, value string)
- func (s *ServerTestFeature) TheResponseShouldMatchJSON(body *godog.DocString)
- func (s *ServerTestFeature) TheResponseShouldNotContainA(key string)
- func (s *ServerTestFeature) WaitForSeconds(seconds int)
- type ServerTestSuite
- type Step
- type SubstitutionFunc
- type SuiteConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodeData ¶
func EncodeItem ¶
func GenerateRandomString ¶
func RandomString ¶
func TrimString ¶
Types ¶
type ServerTestFeature ¶
type ServerTestFeature struct { Engine *gin.Engine Recorder *httptest.ResponseRecorder Client *resty.Client ServiceClient abstract_client.AbstractClient Response *http.Response ResponseString string StatusCode int Token string ID string UserID int APIKey string Message string Err error DirectoryFilePath string GraphQLOperation string SendFileKey string SendFile string 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) ExtractValueFromResponse ¶
func (s *ServerTestFeature) ExtractValueFromResponse(keyName string) error
func (*ServerTestFeature) FileToSendInRequest ¶
func (s *ServerTestFeature) FileToSendInRequest(filename, directory, key string) error
func (*ServerTestFeature) InitializeScenario ¶
func (s *ServerTestFeature) InitializeScenario(ctx *godog.ScenarioContext)
func (*ServerTestFeature) MakeRequest ¶
func (s *ServerTestFeature) MakeRequest(method string, endpoint string, body *godog.DocString)
func (*ServerTestFeature) PerformRequest ¶
func (s *ServerTestFeature) PerformRequest(method, endpoint string, body []byte)
func (*ServerTestFeature) Reset ¶
func (s *ServerTestFeature) Reset(interface{})
func (*ServerTestFeature) SendGQLRequestWithVariables ¶
func (*ServerTestFeature) SendRequest ¶
func (s *ServerTestFeature) SendRequest(method, endpoint string)
func (*ServerTestFeature) SendRequestWithData ¶
func (s *ServerTestFeature) SendRequestWithData(method string, endpoint string, body *godog.DocString)
func (*ServerTestFeature) SetFilePath ¶
func (s *ServerTestFeature) SetFilePath(filename string, directory string) error
func (*ServerTestFeature) ShouldNotContainForJsonQueryPath ¶
func (s *ServerTestFeature) ShouldNotContainForJsonQueryPath(value, jsonQueryPath string) error
func (*ServerTestFeature) TheResponseCodeShouldBe ¶
func (s *ServerTestFeature) TheResponseCodeShouldBe(statusCode int) error
func (*ServerTestFeature) TheResponseHeadersShouldContain ¶
func (s *ServerTestFeature) TheResponseHeadersShouldContain(key, value string)
func (*ServerTestFeature) TheResponseShouldContain ¶
func (s *ServerTestFeature) TheResponseShouldContain(body *godog.DocString)
func (*ServerTestFeature) TheResponseShouldContainA ¶
func (s *ServerTestFeature) TheResponseShouldContainA(key string)
func (*ServerTestFeature) TheResponseShouldContainAThatIsNotNull ¶
func (s *ServerTestFeature) TheResponseShouldContainAThatIsNotNull(jsonQueryPath string) error
func (*ServerTestFeature) TheResponseShouldContainSetTo ¶
func (s *ServerTestFeature) TheResponseShouldContainSetTo(property, value string)
func (*ServerTestFeature) TheResponseShouldMatchJSON ¶
func (s *ServerTestFeature) TheResponseShouldMatchJSON(body *godog.DocString)
func (*ServerTestFeature) TheResponseShouldNotContainA ¶
func (s *ServerTestFeature) TheResponseShouldNotContainA(key string)
func (*ServerTestFeature) WaitForSeconds ¶
func (s *ServerTestFeature) WaitForSeconds(seconds int)
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 ¶
type SuiteConfig ¶
type SuiteConfig struct { Opts *godog.Options ServiceClient graphql_api.PlatformClient Engine *gin.Engine Reset func(sc *godog.Scenario) Steps []Step }
Click to show internal directories.
Click to hide internal directories.