Questions tagged [rest-assured]

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

REST Assured enables testing of REST services in Java.

It uses a fluid syntax inspired by similar libraries for and .

2207 questions
0
votes
0 answers

After ignore SSL certificate via Rest Assured get 401 for token request

After that I have found fix for this Exaptation, javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid…
Igor
  • 1
0
votes
1 answer

Karate Java API for Match methods

Background: I noticed this interesting post on Twitter about a Java API for Karate: https://twitter.com/ptrthomas/status/1344290316212342784 I don't have a twitter account so unable to reply - hope you don't mind me asking here instead. I have used…
0
votes
2 answers

How do I deserialise a Rest-Assure to TodoList?

I want to deserialize Json array in the Rest-Assure respons into TodoList with Todo object as elements in the List. I have a class Todo import java.util.Date; public class Todo { private Long id; private String name; …
stein korsveien
  • 1,047
  • 5
  • 13
  • 35
0
votes
2 answers

NoClassDefFoundError: io/restassured/RestAssured Error is occured

I have imported all the required jars to run RestAssured program. But facing this error. import io.restassured.RestAssured; import static io.restassured.RestAssured.*; public class bascis { public static void main(String[] args) { // TODO…
0
votes
1 answer

How to fetch value of a key from an Array List which has JSON objects

ListownerLst= new ArrayList(); ownerLst= Util.extractListFromResponse(apiResponse, "", "", "owner"); public static List extractListFromResponse(Response apiResponse, String keyToMatch, String valueToMatch, String…
Dhruv Bhatnagar
  • 121
  • 5
  • 17
0
votes
1 answer

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: @Data @Builder …
0
votes
0 answers

NoSuchMethodException when trying to create RequestSpecBuilder object

I'm trying to extend RequestSpecBuilder in Rest Assured and make it into a Singleton so I can front load things like the base uri and pass it around between Scenarios in a Serenity BDD implementation of Cucumber. The basic version (with everything…
Taelus
  • 267
  • 1
  • 6
  • 15
0
votes
1 answer

Rest Assured Framework - Handle Bearer Token, X Api key for Apigee proxy URL

I am trying to create Test Automation framework for Apipgee Proxy URLs. I am using Rest Assured Framework for Apigee proxy URLs with generating Bearer token on the fly ,Xapi Keyand use Apigee proxy URL. For now token is generated manually using CURL…
0
votes
0 answers

How to custom format REST Assured method chaining in Intellij IDEA

Trying to custom format my REST Assured method chaining using the latest version of IntelliJ IDEA. Am using IntelliJ IDEA Ultimate 2020.3 Build #IU-203.5981.144, built on November 30, 2020 and REST Assured 4.3.2. pom.xml:
PacificNW_Lover
  • 4,746
  • 31
  • 90
  • 144
0
votes
2 answers

How to put JSON array inside HTTP PUT call using REST Assured?

Am using rest assured to test an API which requires me to conduct an HTTP PUT with a JSON array, for the request body, which only looks like this: ["6", "7", "8", "9", "10"] Please note that this doesn't require the opening and closing { } - just…
PacificNW_Lover
  • 4,746
  • 31
  • 90
  • 144
0
votes
1 answer

How to set post request payload from json file restassured

Need help on below scenario: I have below pojo class and when i make post call using restassured i dont want to set each field in my java class.To acheive these want to maintain one createissue.json file. when making post call, i want to read each…
0
votes
1 answer

New to cucumber and rest assured, step undefined

I have started a course of Rest assured and Cucumber and I am trying to complete the first video exercise. For some reason, I am not able to make my feature file to find the step definition file. I have checked that the glue option value is set…
Charlie_QA
  • 19
  • 3
0
votes
1 answer

How to get Bearer Token from KeyCloak Service using Rest Assured

I'm trying to find the correct format for obtaining a Bearer Token using Keycloak. Using Postman, I can obtain the token with no issue. If I click on code and Java - OkHttp I get this snippet: OkHttpClient client = new OkHttpClient().newBuilder() …
Steerpike
  • 1,712
  • 6
  • 38
  • 71
0
votes
1 answer

Mock Static method using RestAssuredMockMvc for Spring Cloud Contracts

I've been trying to mock a static method on the producer side to generate and run the contracts against the controller but the tests are running against the actual method Here's the controller on producer where "getId" is the static method in the…
sn879
  • 173
  • 3
  • 12
0
votes
0 answers

Making Jenkins build unstable if cucumber tests skipped

I have cucumber tests with rest-Assured. I tried to use @Skip tags to exclude some tests. But Jenkins integration test stage in the pipeline shows as unstable(Amber). Code that enables skip @RunWith(CucumberWithSerenity.class) @CucumberOptions( …
Shabar
  • 2,617
  • 11
  • 57
  • 98