java.lang.Object
net.serenitybdd.rest.SerenityRest
User: YamStranger
Date: 3/14/16
Time: 8:51 AM
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic io.restassured.response.ValidatableResponseand()static io.restassured.specification.RequestSenderandGiven()Add an additional clause to a RestAssured querystatic io.restassured.authentication.AuthenticationSchemestatic io.restassured.authentication.AuthenticationSchemecertificate(String certURL, String password) static io.restassured.authentication.AuthenticationSchemecertificate(String certURL, String password, io.restassured.authentication.CertificateAuthSettings certificateAuthSettings) static voidclear()Clear the current RestAssured test context, so that the next when() call will create a new RestAssured querystatic io.restassured.config.RestAssuredConfigconfig()static io.restassured.response.Responsedelete()static io.restassured.response.Responsestatic io.restassured.response.Responsestatic io.restassured.response.Responsestatic io.restassured.response.Responsestatic io.restassured.authentication.AuthenticationSchemestatic io.restassured.config.LogConfigstatic io.restassured.config.LogConfigenableLoggingOfRequestAndResponseIfValidationFails(io.restassured.filter.log.LogDetail logDetail) static io.restassured.specification.ResponseSpecificationexpect()static List<io.restassured.filter.Filter> filters()static List<io.restassured.filter.Filter> filters(io.restassured.filter.Filter filter, io.restassured.filter.Filter... additionalFilters) static List<io.restassured.filter.Filter> static io.restassured.authentication.AuthenticationSchemestatic io.restassured.authentication.AuthenticationSchemestatic io.restassured.response.Responseget()static io.restassured.response.Responsestatic io.restassured.response.Responsestatic io.restassured.response.Responsestatic io.restassured.response.Responsestatic io.restassured.authentication.AuthenticationSchemestatic Stringstatic io.restassured.config.RestAssuredConfigstatic io.restassured.parsing.Parserstatic intstatic io.restassured.specification.ProxySpecificationstatic io.restassured.specification.RequestSpecificationstatic io.restassured.specification.ResponseSpecificationstatic Stringstatic Stringstatic io.restassured.specification.RequestSpecificationgiven()Create a new RestAssured query sequencestatic io.restassured.specification.RequestSpecificationgiven(io.restassured.specification.RequestSpecification requestSpecification) static io.restassured.specification.RequestSendergiven(io.restassured.specification.RequestSpecification request, io.restassured.specification.ResponseSpecification response) static io.restassured.specification.RequestSpecificationstatic io.restassured.response.Responsehead()static io.restassured.response.Responsestatic io.restassured.response.Responsestatic io.restassured.response.Responsestatic io.restassured.response.Responsestatic booleanstatic io.restassured.config.SSLConfigstatic io.restassured.config.SSLConfigstatic io.restassured.config.SSLConfigstatic io.restassured.response.Responsestatic io.restassured.authentication.AuthenticationSchemestatic io.restassured.authentication.AuthenticationSchemeoauth(String consumerKey, String consumerSecret, String accessToken, String secretToken, io.restassured.authentication.OAuthSignature signature) static io.restassured.authentication.AuthenticationSchemestatic io.restassured.authentication.AuthenticationSchemestatic io.restassured.mapper.ObjectMapperobjectMapper(io.restassured.mapper.ObjectMapper objectMapper) static io.restassured.response.Responseoptions()static io.restassured.response.Responsestatic io.restassured.response.Responsestatic io.restassured.response.Responsestatic io.restassured.response.Responsestatic io.restassured.response.Responsepatch()static io.restassured.response.Responsestatic io.restassured.response.Responsestatic io.restassured.response.Responsestatic io.restassured.response.Responsestatic io.restassured.response.Responsepost()static io.restassured.response.Responsestatic io.restassured.response.Responsestatic io.restassured.response.Responsestatic io.restassured.response.Responsestatic io.restassured.authentication.PreemptiveAuthProviderstatic io.restassured.specification.ProxySpecificationproxy(int port) static io.restassured.specification.ProxySpecificationproxy(io.restassured.specification.ProxySpecification proxySpecification) static io.restassured.specification.ProxySpecificationstatic io.restassured.specification.ProxySpecificationstatic io.restassured.specification.ProxySpecificationstatic io.restassured.specification.ProxySpecificationstatic io.restassured.response.Responseput()static io.restassured.response.Responsestatic io.restassured.response.Responsestatic io.restassured.response.Responsestatic voidregisterParser(String contentType, io.restassured.parsing.Parser parser) static List<io.restassured.filter.Filter> replaceFiltersWith(io.restassured.filter.Filter filter, io.restassured.filter.Filter... additionalFilters) static List<io.restassured.filter.Filter> replaceFiltersWith(List<io.restassured.filter.Filter> filters) static voidreset()static io.restassured.specification.RequestSpecificationrest()static voidrestAssuredThat(Consumer<io.restassured.response.ValidatableResponse> expectedCondition) A convenience method that allows you to check the last response received using a lambda expression, e.g.static io.restassured.authentication.AuthenticationSchemesetDefaultAuthentication(io.restassured.authentication.AuthenticationScheme authentication) static StringsetDefaultBasePath(String basePath) static io.restassured.config.RestAssuredConfigsetDefaultConfig(io.restassured.config.RestAssuredConfig config) static io.restassured.parsing.ParsersetDefaultParser(io.restassured.parsing.Parser defaultParser) static intsetDefaultPort(int port) static io.restassured.specification.ProxySpecificationsetDefaultProxy(int port) static io.restassured.specification.ProxySpecificationsetDefaultProxy(io.restassured.specification.ProxySpecification proxy) static io.restassured.specification.ProxySpecificationsetDefaultProxy(String host, int port) static io.restassured.specification.ProxySpecificationsetDefaultProxy(String host, int port, String scheme) static io.restassured.specification.ProxySpecificationsetDefaultProxy(URI uri) static io.restassured.specification.RequestSpecificationsetDefaultRequestSpecification(io.restassured.specification.RequestSpecification requestSpecification) static io.restassured.specification.ResponseSpecificationsetDefaultResponseSpecification(io.restassured.specification.ResponseSpecification responseSpecification) static StringsetDefaultRootPath(String rootPath) static StringsetDefaultSessionId(String sessionId) static booleansetUrlEncodingEnabled(boolean urlEncodingEnabled) static io.restassured.response.ValidatableResponsethen()static io.restassured.config.SSLConfigtrustStore(KeyStore truststore) static voidunregisterParser(String contentType) static io.restassured.config.SSLConfigstatic io.restassured.config.SSLConfiguseRelaxedHTTPSValidation(String protocol) static io.restassured.specification.RequestSenderwhen()Add an action to a RestAssured query, building on previous given() statements if they were called.static io.restassured.specification.RequestSpecificationwith()static List<io.restassured.specification.Argument> static List<io.restassured.specification.Argument> withArguments(Object firstArgument, Object... additionalArguments) static List<io.restassured.specification.Argument> static List<io.restassured.specification.Argument>
-
Constructor Details
-
SerenityRest
public SerenityRest()
-
-
Method Details
-
rest
public static io.restassured.specification.RequestSpecification rest() -
and
public static io.restassured.response.ValidatableResponse and() -
then
public static io.restassured.response.ValidatableResponse then() -
lastResponse
public static io.restassured.response.Response lastResponse() -
setDefaultBasePath
-
getDefaultBasePath
-
getDefaultPort
public static int getDefaultPort() -
setDefaultPort
public static int setDefaultPort(int port) -
isUrlEncodingEnabled
public static boolean isUrlEncodingEnabled() -
setUrlEncodingEnabled
public static boolean setUrlEncodingEnabled(boolean urlEncodingEnabled) -
getDefaultRootPath
-
setDefaultRootPath
-
getDefaultSessionId
-
setDefaultSessionId
-
getDefaultAuthentication
public static io.restassured.authentication.AuthenticationScheme getDefaultAuthentication() -
setDefaultAuthentication
public static io.restassured.authentication.AuthenticationScheme setDefaultAuthentication(io.restassured.authentication.AuthenticationScheme authentication) -
getDefaultRequestSpecification
public static io.restassured.specification.RequestSpecification getDefaultRequestSpecification() -
setDefaultRequestSpecification
public static io.restassured.specification.RequestSpecification setDefaultRequestSpecification(io.restassured.specification.RequestSpecification requestSpecification) -
getDefaultParser
public static io.restassured.parsing.Parser getDefaultParser() -
setDefaultParser
public static io.restassured.parsing.Parser setDefaultParser(io.restassured.parsing.Parser defaultParser) -
getDefaultResponseSpecification
public static io.restassured.specification.ResponseSpecification getDefaultResponseSpecification() -
setDefaultResponseSpecification
public static io.restassured.specification.ResponseSpecification setDefaultResponseSpecification(io.restassured.specification.ResponseSpecification responseSpecification) -
reset
public static void reset() -
filters
-
filters
public static List<io.restassured.filter.Filter> filters(io.restassured.filter.Filter filter, io.restassured.filter.Filter... additionalFilters) -
replaceFiltersWith
-
replaceFiltersWith
public static List<io.restassured.filter.Filter> replaceFiltersWith(io.restassured.filter.Filter filter, io.restassured.filter.Filter... additionalFilters) -
filters
-
objectMapper
public static io.restassured.mapper.ObjectMapper objectMapper(io.restassured.mapper.ObjectMapper objectMapper) -
expect
public static io.restassured.specification.ResponseSpecification expect() -
with
public static io.restassured.specification.RequestSpecification with() -
withArguments
-
withNoArguments
-
withArgs
-
withNoArgs
-
given
public static io.restassured.specification.RequestSpecification given()Create a new RestAssured query sequence- Returns:
-
givenWithNoReporting
public static io.restassured.specification.RequestSpecification givenWithNoReporting() -
andGiven
public static io.restassured.specification.RequestSender andGiven()Add an additional clause to a RestAssured query- Returns:
-
clear
public static void clear()Clear the current RestAssured test context, so that the next when() call will create a new RestAssured query -
when
public static io.restassured.specification.RequestSender when()Add an action to a RestAssured query, building on previous given() statements if they were called.- Returns:
-
given
public static io.restassured.specification.RequestSender given(io.restassured.specification.RequestSpecification request, io.restassured.specification.ResponseSpecification response) -
given
public static io.restassured.specification.RequestSpecification given(io.restassured.specification.RequestSpecification requestSpecification) -
useRelaxedHTTPSValidation
public static io.restassured.config.SSLConfig useRelaxedHTTPSValidation() -
useRelaxedHTTPSValidation
-
registerParser
-
unregisterParser
-
oauth2
-
trustStore
-
certificate
-
enableLoggingOfRequestAndResponseIfValidationFails
public static io.restassured.config.LogConfig enableLoggingOfRequestAndResponseIfValidationFails() -
enableLoggingOfRequestAndResponseIfValidationFails
public static io.restassured.config.LogConfig enableLoggingOfRequestAndResponseIfValidationFails(io.restassured.filter.log.LogDetail logDetail) -
certificate
-
form
-
preemptive
public static io.restassured.authentication.PreemptiveAuthProvider preemptive() -
form
-
oauth2
public static io.restassured.authentication.AuthenticationScheme oauth2(String accessToken, io.restassured.authentication.OAuthSignature signature) -
basic
-
proxy
-
proxy
-
proxy
public static io.restassured.specification.ProxySpecification proxy(int port) -
proxy
-
proxy
-
proxy
public static io.restassured.specification.ProxySpecification proxy(io.restassured.specification.ProxySpecification proxySpecification) -
setDefaultProxy
-
setDefaultProxy
public static io.restassured.specification.ProxySpecification setDefaultProxy(io.restassured.specification.ProxySpecification proxy) -
setDefaultProxy
public static io.restassured.specification.ProxySpecification setDefaultProxy(String host, int port) -
setDefaultProxy
public static io.restassured.specification.ProxySpecification setDefaultProxy(int port) -
setDefaultProxy
-
getDefaultProxy
public static io.restassured.specification.ProxySpecification getDefaultProxy() -
keystore
-
keystore
-
keystore
-
head
-
head
public static io.restassured.response.Response head() -
head
-
head
-
head
-
config
public static io.restassured.config.RestAssuredConfig config() -
getDefaultConfig
public static io.restassured.config.RestAssuredConfig getDefaultConfig() -
setDefaultConfig
public static io.restassured.config.RestAssuredConfig setDefaultConfig(io.restassured.config.RestAssuredConfig config) -
oauth
-
oauth
-
digest
-
options
public static io.restassured.response.Response options() -
options
-
options
-
options
-
options
-
patch
-
patch
-
patch
-
patch
public static io.restassured.response.Response patch() -
patch
-
post
-
post
-
post
-
post
public static io.restassured.response.Response post() -
post
-
put
-
put
-
put
public static io.restassured.response.Response put() -
put
-
delete
-
delete
-
delete
-
delete
public static io.restassured.response.Response delete() -
delete
-
get
-
get
-
get
-
get
-
get
public static io.restassured.response.Response get() -
restAssuredThat
public static void restAssuredThat(Consumer<io.restassured.response.ValidatableResponse> expectedCondition) A convenience method that allows you to check the last response received using a lambda expression, e.g. restAssuredThat(lastResponse -> lastResponse.body(equalTo(expectedMessage)));
-