Skip to content
Advertisement

Tag: rest-assured

what is “def” in Java class

Currently, I am using RestAssured for API automation in my project. As we know, it is a Java Project. When I look at the code of class named “TestSpecificationImpl” in Rest-Assured API. I can see that, it is using methods like: I heard about the concept of local variable type inference in java. But it is a concept of Java

Lombok returns null as a value of response

I’ve got a problem with my Api tests. When i’m trying to get data from api, lombok returns null as an acceptance value, but there are values with real numbers in api. Screenchot: https://prnt.sc/w98nt2 My DTO for the responce: My steps that extacts body and send post request public class PositionSteps { Api json responce getting properly. it means that

How to set boundary in RestAssured

I’m trying to create multipart POST call using RestAssured, but I don’t know how to get any boundary there. I tried this code, but it doesn’t work. Log Wanted result: So, how do I get ——WebKitFormBoundary123 in the request multipart form? UPDATE: If I use this: I will get this, which still doesn’t look the same and it doesn’t work

response.jsonPath() has square brackets around the element, how do I retrieve the string value? Rest Assured

I have an HTTP response body that looks that this when I make a GET request: When I try to assert the results with “Rest Assured”, the name value is always wrapped in square brackets []. So the test fails with Expected “MyNameTest”, but was “[MyNameTest]” Can any one tell me how to resolve this? Answer You are accessing values

Advertisement