ApiResponse
getResponseData
â
This method will get the response data from the response body.
Parametersâ
expression
â
This parameter expects a valid JsonPath
expression.
Return Type: String
â
Returns the response data as string.
getResponseData
â
This method will get the response data from the response body.
Parametersâ
expression
â
This parameter expects a valid JsonPath
expression.
type
â
This parameter expects a class type.
Return Type: <T>
â
Returns the response data as Java object.
verifyBooleanField
â
This method will verify the boolean field in the response body.
Parametersâ
expression
â
This parameter expects a valid JsonPath
expression.
Return Type: BooleanSubject
â
Returns the BooleanSubject
object.
verifyIntField
â
This method will verify the boolean field in the response body.
Parametersâ
expression
â
This parameter expects a valid JsonPath
expression.
Return Type: IntegerSubject
â
Returns the IntegerSubject
object.
verifyStatusCode
â
This method will verify the status code of the response.
Return Type: IntegerSubject
â
Returns the IntegerSubject
object.
verifyStatusMessage
â
This method will verify the status message of the response.
Return Type: StringSubject
â
Returns the StringSubject
object.
verifyTextField
â
This method will verify the text field in the response body.
Parametersâ
expression
â
This parameter expects a valid JsonPath
expression.
Return Type: StringSubject
â
Returns the StringSubject
object.
verifyHeader
â
This method will verify the header keys in the response body.
Parametersâ
key
â
This parameter expects a valid key
value.
Return Type: StringSubject
â
Returns the StringSubject
object.
verifySchema
â
This method will verify the api response body json schema.
Parametersâ
schemaName
â
This parameter expects a valid schemaName
value. The schemaName is a json file containing the expected json schema version stored at location src/test/resources/schema/<schameName>.json
.