Category "rest-assured"

How to get value from json using restassured

I have json and there is array of 'products'. { "data": [ { "contact_id": "...", "email": "...", "first_name": "...", "hash_campai

Generate json request body using Lombok annotation

I tried multiple pattern , but still no success how can I create JSON Array object with nested JSON object similar like below { "deduction": [ { "id

AllureRestAssured , how to ignore logging headers

I am using rest-assured and allureRestAssured for testing api , given().header("Content-Type", "application/json") .header("key", key()).filter(

I am getting an error "Failed to parse the JSON document", I have used JsonPath

//Get place { String getPlaceResponse = given().log().all().queryParam("key", "qaclick123").queryParam("place_id", placeId ) .when().get(

How to wait for xml response to load in rest assured

API responses currently we are working on are in xml format. We suspect our test cases in rest assured are failing because we are not really waiting for the res

Exception in thread "main" java.net.SocketTimeoutException: Connect timed out

When I run the script using web API automation rest assured framework, I am not getting the proper api response and below are the error are posted. at java.base

"java.lang.ExceptionInInitializerError" error in RestAssured post request with body

I'm using restassured library and at the below line i'm getting "java.lang.ExceptionInInitializerError" error caused by "Caused by: java.lang.reflect.Inaccessib

Getting the value from the response element using GPath and Rest Assured

I want to get the value of status from my response. So that i can assert it. I'm using rest assured with java & serenity BDD. Response { "locationType":

RestAssured: posting json request having both String and Integer

I just want to POST json request(using restassured), for such json: { "userId": 1, "id": 111, "title":"test msg" "body": "this is test msg" } Im defining

Asserting Rest Assured response with Json Unit

I'm currently using rest assured and Json-unit to assert a local json file against the requested rest assured response. I currently have a before class method

hasKey doesn't see the field in the response

I have test: @Test public void sixTest() { FlowerList flowerList = new FlowerList(); Specification.installSpec(Specification.requestSpec(),

Check that each Color field has a color value (format string "#FFFFFF")

I have task: "Check that each Color field has a color value (format string "#FFFFFF")". I have a solution: @Test public void sixTest() { Specification.insta

Springboot REST API RestAssured testing project setup and project structure

I have a Springboot application that is a REST API and I would like to start adding RESTAssured integration tests with JUnit 5. I also added folder structure to

Getting java.lang.SecurityException - "org.hamcrest.Matchers"'s signer information does not match

I am executing below Rest Assured Program: io.restassured.RestAssured.baseURI ="http://a.b.c.d:9200/e/f"; Response responseNew=null; req

How to Pass JSON in the body of GET Request in Rest Assured?

Trying to pass this JSON in the body of a get request in rest assured. Is creating a JSON object a way to go ? { "pharmacyListId": null, "pharmacyListNa

REST Assured: Deserialization and Inheritance to cater to varied Responses being returned by an API endpoint

I have a situation where sometimes the response of an API is { "SuccessCode": "OPERATION_SUCCESS", "Message": "Operation completed successfully" } a