Top "Rest-assured" questions

REST Assured is a Java library that provides a domain-specific language (DSL) for writing powerful, maintainable tests for RESTful APIs.

Set restAssured to log all requests and responses globally

I want to enable logging for all restAssured responses and requests by default. Here's what I do: RestAssured.requestSpecification = new …

java rest logging rest-assured
REST Assured - Generic List deserialization

Let's say I have a Java Person class: class Person { String name; String email; } With REST Assured, you can deserialize …

java arrays json deserialization rest-assured
How to pass authorization token in header in Rest assured?

Trying to automate api testing using Rest assured @Test public void Login() { Response resp = given(). body("{\"phone_number\":\"2222222222\",\"\r\n" + " + \" \"…

java rest authentication rest-assured
In REST Assured, how can I check if a field is present or not in the response?

How can I make sure that my response, let's say it is in JSON, either contains or does not contain …

java rest rest-assured
Rest Assured - can't POST with Parameters and Body

I'm testing a REST api using Rest Assured. I'm running into an error when trying to POST with both a …

java rest rest-assured
RestAssured: How to check the length of json array response?

I have an endpoint that returns a JSON like: [ {"id" : 4, "name" : "Name4"}, {"id" : 5, "name" : "Name5"} ] and a DTO class: public …

json rest-assured
JSON POST using RestAssured

I am trying to create a test to validate the response of a JSON Post is as expected. I am …

java rest-assured
POST request fails (rest-assured test)

I have problem with making POST request with rest-assured. This code works: given().contentType(ContentType.JSON).body("{\"key\": \"val\"}"). when().…

java json http-post rest-assured
How to fetch JSON object from Json array in REstAssured

Can anyone please help me to solve this scenario: I am new to RestAssured and handling JSON in our automation …

java rest rest-assured
POST request in rest assured

I am using rest assured for the post request containing the JSON body My post request code is :- RestAssuredResponseImpl …

rest rest-assured