public class SerenityRest extends Object
Constructor and Description |
---|
SerenityRest() |
Modifier and Type | Method and Description |
---|---|
static io.restassured.response.ValidatableResponse |
and() |
static io.restassured.specification.RequestSender |
andGiven()
Add an additional clause to a RestAssured query
|
static io.restassured.authentication.AuthenticationScheme |
basic(String userName,
String password) |
static io.restassured.authentication.AuthenticationScheme |
certificate(String certURL,
String password) |
static io.restassured.authentication.AuthenticationScheme |
certificate(String certURL,
String password,
io.restassured.authentication.CertificateAuthSettings certificateAuthSettings) |
static void |
clear()
Clear the current RestAssured test context, so that the next when() call will create a new RestAssured query
|
static io.restassured.config.RestAssuredConfig |
config() |
static io.restassured.response.Response |
delete() |
static io.restassured.response.Response |
delete(String path,
Map<String,?> pathParams) |
static io.restassured.response.Response |
delete(String path,
Object... pathParams) |
static io.restassured.response.Response |
delete(URI uri) |
static io.restassured.response.Response |
delete(URL url) |
static io.restassured.authentication.AuthenticationScheme |
digest(String userName,
String password) |
static io.restassured.config.LogConfig |
enableLoggingOfRequestAndResponseIfValidationFails() |
static io.restassured.config.LogConfig |
enableLoggingOfRequestAndResponseIfValidationFails(io.restassured.filter.log.LogDetail logDetail) |
static io.restassured.specification.ResponseSpecification |
expect() |
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> |
filters(List<io.restassured.filter.Filter> filters) |
static io.restassured.authentication.AuthenticationScheme |
form(String userName,
String password) |
static io.restassured.authentication.AuthenticationScheme |
form(String userName,
String password,
io.restassured.authentication.FormAuthConfig config) |
static io.restassured.response.Response |
get() |
static io.restassured.response.Response |
get(String path,
Map<String,?> pathParams) |
static io.restassured.response.Response |
get(String path,
Object... pathParams) |
static io.restassured.response.Response |
get(URI uri) |
static io.restassured.response.Response |
get(URL url) |
static io.restassured.authentication.AuthenticationScheme |
getDefaultAuthentication() |
static String |
getDefaultBasePath() |
static io.restassured.config.RestAssuredConfig |
getDefaultConfig() |
static io.restassured.parsing.Parser |
getDefaultParser() |
static int |
getDefaultPort() |
static io.restassured.specification.ProxySpecification |
getDefaultProxy() |
static io.restassured.specification.RequestSpecification |
getDefaultRequestSpecification() |
static io.restassured.specification.ResponseSpecification |
getDefaultResponseSpecification() |
static String |
getDefaultRootPath() |
static String |
getDefaultSessionId() |
static io.restassured.specification.RequestSpecification |
given()
Create a new RestAssured query sequence
|
static io.restassured.specification.RequestSpecification |
given(io.restassured.specification.RequestSpecification requestSpecification) |
static io.restassured.specification.RequestSender |
given(io.restassured.specification.RequestSpecification request,
io.restassured.specification.ResponseSpecification response) |
static io.restassured.specification.RequestSpecification |
givenWithNoReporting() |
static io.restassured.response.Response |
head() |
static io.restassured.response.Response |
head(String path,
Map<String,?> pathParams) |
static io.restassured.response.Response |
head(String path,
Object... pathParams) |
static io.restassured.response.Response |
head(URI uri) |
static io.restassured.response.Response |
head(URL url) |
static boolean |
isUrlEncodingEnabled() |
static io.restassured.config.SSLConfig |
keystore(File pathToJks,
String password) |
static io.restassured.config.SSLConfig |
keystore(String password) |
static io.restassured.config.SSLConfig |
keystore(String pathToJks,
String password) |
static io.restassured.response.Response |
lastResponse() |
static io.restassured.authentication.AuthenticationScheme |
oauth(String consumerKey,
String consumerSecret,
String accessToken,
String secretToken) |
static io.restassured.authentication.AuthenticationScheme |
oauth(String consumerKey,
String consumerSecret,
String accessToken,
String secretToken,
io.restassured.authentication.OAuthSignature signature) |
static io.restassured.authentication.AuthenticationScheme |
oauth2(String accessToken) |
static io.restassured.authentication.AuthenticationScheme |
oauth2(String accessToken,
io.restassured.authentication.OAuthSignature signature) |
static io.restassured.mapper.ObjectMapper |
objectMapper(io.restassured.mapper.ObjectMapper objectMapper) |
static io.restassured.response.Response |
options() |
static io.restassured.response.Response |
options(String path,
Map<String,?> pathParams) |
static io.restassured.response.Response |
options(String path,
Object... pathParams) |
static io.restassured.response.Response |
options(URI uri) |
static io.restassured.response.Response |
options(URL url) |
static io.restassured.response.Response |
patch() |
static io.restassured.response.Response |
patch(String path,
Map<String,?> pathParams) |
static io.restassured.response.Response |
patch(String path,
Object... pathParams) |
static io.restassured.response.Response |
patch(URI uri) |
static io.restassured.response.Response |
patch(URL url) |
static io.restassured.response.Response |
post() |
static io.restassured.response.Response |
post(String path,
Map<String,?> pathParams) |
static io.restassured.response.Response |
post(String path,
Object... pathParams) |
static io.restassured.response.Response |
post(URI uri) |
static io.restassured.response.Response |
post(URL url) |
static io.restassured.authentication.PreemptiveAuthProvider |
preemptive() |
static io.restassured.specification.ProxySpecification |
proxy(int port) |
static io.restassured.specification.ProxySpecification |
proxy(io.restassured.specification.ProxySpecification proxySpecification) |
static io.restassured.specification.ProxySpecification |
proxy(String host) |
static io.restassured.specification.ProxySpecification |
proxy(String host,
int port) |
static io.restassured.specification.ProxySpecification |
proxy(String host,
int port,
String scheme) |
static io.restassured.specification.ProxySpecification |
proxy(URI uri) |
static io.restassured.response.Response |
put() |
static io.restassured.response.Response |
put(String path,
Object... pathParams) |
static io.restassured.response.Response |
put(URI uri) |
static io.restassured.response.Response |
put(URL url) |
static void |
registerParser(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 void |
reset() |
static io.restassured.specification.RequestSpecification |
rest() |
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.
|
static io.restassured.authentication.AuthenticationScheme |
setDefaultAuthentication(io.restassured.authentication.AuthenticationScheme authentication) |
static String |
setDefaultBasePath(String basePath) |
static io.restassured.config.RestAssuredConfig |
setDefaultConfig(io.restassured.config.RestAssuredConfig config) |
static io.restassured.parsing.Parser |
setDefaultParser(io.restassured.parsing.Parser defaultParser) |
static int |
setDefaultPort(int port) |
static io.restassured.specification.ProxySpecification |
setDefaultProxy(int port) |
static io.restassured.specification.ProxySpecification |
setDefaultProxy(io.restassured.specification.ProxySpecification proxy) |
static io.restassured.specification.ProxySpecification |
setDefaultProxy(String host,
int port) |
static io.restassured.specification.ProxySpecification |
setDefaultProxy(String host,
int port,
String scheme) |
static io.restassured.specification.ProxySpecification |
setDefaultProxy(URI uri) |
static io.restassured.specification.RequestSpecification |
setDefaultRequestSpecification(io.restassured.specification.RequestSpecification requestSpecification) |
static io.restassured.specification.ResponseSpecification |
setDefaultResponseSpecification(io.restassured.specification.ResponseSpecification responseSpecification) |
static String |
setDefaultRootPath(String rootPath) |
static String |
setDefaultSessionId(String sessionId) |
static boolean |
setUrlEncodingEnabled(boolean urlEncodingEnabled) |
static io.restassured.response.ValidatableResponse |
then() |
static io.restassured.config.SSLConfig |
trustStore(KeyStore truststore) |
static void |
unregisterParser(String contentType) |
static io.restassured.config.SSLConfig |
useRelaxedHTTPSValidation() |
static io.restassured.config.SSLConfig |
useRelaxedHTTPSValidation(String protocol) |
static io.restassured.specification.RequestSender |
when()
Add an action to a RestAssured query, building on previous given() statements if they were called.
|
static io.restassured.specification.RequestSpecification |
with() |
static List<io.restassured.specification.Argument> |
withArgs(Object firstArgument,
Object... additionalArguments) |
static List<io.restassured.specification.Argument> |
withArguments(Object firstArgument,
Object... additionalArguments) |
static List<io.restassured.specification.Argument> |
withNoArgs() |
static List<io.restassured.specification.Argument> |
withNoArguments() |
public static io.restassured.specification.RequestSpecification rest()
public static io.restassured.response.ValidatableResponse and()
public static io.restassured.response.ValidatableResponse then()
public static io.restassured.response.Response lastResponse()
public static String getDefaultBasePath()
public static int getDefaultPort()
public static int setDefaultPort(int port)
public static boolean isUrlEncodingEnabled()
public static boolean setUrlEncodingEnabled(boolean urlEncodingEnabled)
public static String getDefaultRootPath()
public static String getDefaultSessionId()
public static io.restassured.authentication.AuthenticationScheme getDefaultAuthentication()
public static io.restassured.authentication.AuthenticationScheme setDefaultAuthentication(io.restassured.authentication.AuthenticationScheme authentication)
public static io.restassured.specification.RequestSpecification getDefaultRequestSpecification()
public static io.restassured.specification.RequestSpecification setDefaultRequestSpecification(io.restassured.specification.RequestSpecification requestSpecification)
public static io.restassured.parsing.Parser getDefaultParser()
public static io.restassured.parsing.Parser setDefaultParser(io.restassured.parsing.Parser defaultParser)
public static io.restassured.specification.ResponseSpecification getDefaultResponseSpecification()
public static io.restassured.specification.ResponseSpecification setDefaultResponseSpecification(io.restassured.specification.ResponseSpecification responseSpecification)
public static void reset()
public static List<io.restassured.filter.Filter> filters(List<io.restassured.filter.Filter> filters)
public static List<io.restassured.filter.Filter> filters(io.restassured.filter.Filter filter, io.restassured.filter.Filter... additionalFilters)
public static List<io.restassured.filter.Filter> replaceFiltersWith(List<io.restassured.filter.Filter> filters)
public static List<io.restassured.filter.Filter> replaceFiltersWith(io.restassured.filter.Filter filter, io.restassured.filter.Filter... additionalFilters)
public static List<io.restassured.filter.Filter> filters()
public static io.restassured.mapper.ObjectMapper objectMapper(io.restassured.mapper.ObjectMapper objectMapper)
public static io.restassured.specification.ResponseSpecification expect()
public static io.restassured.specification.RequestSpecification with()
public static List<io.restassured.specification.Argument> withArguments(Object firstArgument, Object... additionalArguments)
public static List<io.restassured.specification.Argument> withNoArguments()
public static List<io.restassured.specification.Argument> withArgs(Object firstArgument, Object... additionalArguments)
public static List<io.restassured.specification.Argument> withNoArgs()
public static io.restassured.specification.RequestSpecification given()
public static io.restassured.specification.RequestSpecification givenWithNoReporting()
public static io.restassured.specification.RequestSender andGiven()
public static void clear()
public static io.restassured.specification.RequestSender when()
public static io.restassured.specification.RequestSender given(io.restassured.specification.RequestSpecification request, io.restassured.specification.ResponseSpecification response)
public static io.restassured.specification.RequestSpecification given(io.restassured.specification.RequestSpecification requestSpecification)
public static io.restassured.config.SSLConfig useRelaxedHTTPSValidation()
public static io.restassured.config.SSLConfig useRelaxedHTTPSValidation(String protocol)
public static void registerParser(String contentType, io.restassured.parsing.Parser parser)
public static void unregisterParser(String contentType)
public static io.restassured.authentication.AuthenticationScheme oauth2(String accessToken)
public static io.restassured.config.SSLConfig trustStore(KeyStore truststore)
public static io.restassured.authentication.AuthenticationScheme certificate(String certURL, String password)
public static io.restassured.config.LogConfig enableLoggingOfRequestAndResponseIfValidationFails()
public static io.restassured.config.LogConfig enableLoggingOfRequestAndResponseIfValidationFails(io.restassured.filter.log.LogDetail logDetail)
public static io.restassured.authentication.AuthenticationScheme certificate(String certURL, String password, io.restassured.authentication.CertificateAuthSettings certificateAuthSettings)
public static io.restassured.authentication.AuthenticationScheme form(String userName, String password)
public static io.restassured.authentication.PreemptiveAuthProvider preemptive()
public static io.restassured.authentication.AuthenticationScheme form(String userName, String password, io.restassured.authentication.FormAuthConfig config)
public static io.restassured.authentication.AuthenticationScheme oauth2(String accessToken, io.restassured.authentication.OAuthSignature signature)
public static io.restassured.authentication.AuthenticationScheme basic(String userName, String password)
public static io.restassured.specification.ProxySpecification proxy(String host, int port, String scheme)
public static io.restassured.specification.ProxySpecification proxy(String host, int port)
public static io.restassured.specification.ProxySpecification proxy(int port)
public static io.restassured.specification.ProxySpecification proxy(URI uri)
public static io.restassured.specification.ProxySpecification proxy(String host)
public static io.restassured.specification.ProxySpecification proxy(io.restassured.specification.ProxySpecification proxySpecification)
public static io.restassured.specification.ProxySpecification setDefaultProxy(String host, int port, String scheme)
public static io.restassured.specification.ProxySpecification setDefaultProxy(io.restassured.specification.ProxySpecification proxy)
public static io.restassured.specification.ProxySpecification setDefaultProxy(String host, int port)
public static io.restassured.specification.ProxySpecification setDefaultProxy(int port)
public static io.restassured.specification.ProxySpecification setDefaultProxy(URI uri)
public static io.restassured.specification.ProxySpecification getDefaultProxy()
public static io.restassured.config.SSLConfig keystore(String password)
public static io.restassured.response.Response head(URI uri)
public static io.restassured.response.Response head()
public static io.restassured.response.Response head(URL url)
public static io.restassured.config.RestAssuredConfig config()
public static io.restassured.config.RestAssuredConfig getDefaultConfig()
public static io.restassured.config.RestAssuredConfig setDefaultConfig(io.restassured.config.RestAssuredConfig config)
public static io.restassured.authentication.AuthenticationScheme oauth(String consumerKey, String consumerSecret, String accessToken, String secretToken, io.restassured.authentication.OAuthSignature signature)
public static io.restassured.authentication.AuthenticationScheme oauth(String consumerKey, String consumerSecret, String accessToken, String secretToken)
public static io.restassured.authentication.AuthenticationScheme digest(String userName, String password)
public static io.restassured.response.Response options()
public static io.restassured.response.Response options(URL url)
public static io.restassured.response.Response options(URI uri)
public static io.restassured.response.Response options(String path, Map<String,?> pathParams)
public static io.restassured.response.Response patch(URI uri)
public static io.restassured.response.Response patch(URL url)
public static io.restassured.response.Response patch()
public static io.restassured.response.Response post(URL url)
public static io.restassured.response.Response post()
public static io.restassured.response.Response post(URI uri)
public static io.restassured.response.Response put(URI uri)
public static io.restassured.response.Response put()
public static io.restassured.response.Response put(URL url)
public static io.restassured.response.Response delete(URL url)
public static io.restassured.response.Response delete(URI uri)
public static io.restassured.response.Response delete()
public static io.restassured.response.Response get(URI uri)
public static io.restassured.response.Response get(URL url)
public static io.restassured.response.Response get()
public static void restAssuredThat(Consumer<io.restassured.response.ValidatableResponse> expectedCondition)
Copyright © 2022. All rights reserved.