Questions tagged [rest-assured-jsonpath]

For use only with the popular REST-Assured API testing framework for Java.

Path-based query syntax for JSON documents in the REST-Assured framework for API testing. Not to be confused with the JsonPath specification (http://goessner.net/articles/JsonPath/)

Docs: https://github.com/rest-assured/rest-assured/wiki/Usage#json-using-jsonpath

382 questions
0
votes
1 answer

$ dont work with JsonPath

I Post one Json with RestAssured and After I need to verify that all fields are stored in the database with the correct values.My Json is : { "id": "1", "name": "name1", "description": "description1", "source": "source1", …
ksouri
  • 21
  • 4
0
votes
0 answers

Expected result doesn't match the actual result REST-assured

I'm testing changePassword() method. I'm checking by giving a wrong password firstly, then giving parameters correctly on the second part. However, for the wrong password, it's giving me error for the body(). If I log().body() it doesn't print out…
kenkulan
  • 147
  • 4
  • 14
0
votes
1 answer

Using rest-assured get value using path method

I want to extract value of s.d.url from the below JSON. I am using the below satement as shown using System.out.println but I dont get the result. How do I do it when the field itself contains "." JSON { "data":{ "H1":{ …
for stack
  • 3
  • 3
0
votes
1 answer

REST Assured getting map values only from response body

Imagine i called a RESTful service and it returns this in response body [ { "key": "Reason1 key", "values": { "en": "Reason1 English translation", "es": "Reason1 Spanish translation" } }, { "key": "Reason2 key", …
mibrahim.iti
  • 1,928
  • 5
  • 22
  • 50
0
votes
1 answer

Not able to parse JsonPath in restassured

Using Restassured 3.0.1 I have a Json :: json = { "prices": { "Test": { "PriceMap": { "30": "295" } } } } JsonPath jsonPath = new JsonPath(json); jsonPath.get("prices.Test.PriceMap.*") getting error : Caused…
user522170
  • 623
  • 1
  • 6
  • 21
0
votes
1 answer

Can we use Jmeter with Rest Assurred framework?

I need to know if we can implement Jmeter script with the RestAssured framework?
N. Sinha
  • 11
  • 3
0
votes
1 answer

Extracting value of a node in Java using contains with JsonPath in RestAssured

I have to extract value of book title using JsonPath in RestAssured in Java from following json response { "spec": { "groups": [ { "name": "book", "title": "classic-books:1.0.2" },....... …
trial999
  • 1,646
  • 6
  • 21
  • 36
0
votes
0 answers

rest-assured: Format of number change after being retrieved using JsonPath

I am observing that the format or value of an item from a rest-assured response is changed when I try to retrieve the item using JsonPath. Value of the field is 16637906.26 when I get the response.asString(). However when I retrieve this specific…
0
votes
1 answer

REST Assured, How to import "from" statically from the JsonPath class?

I'm trying to do something like this, bit is not working fine, I don't get how to import "from" statically from the JsonPath class, that says I should do here: // "from" is statically imported from the JsonPath class List bookTitles =…
Zilev av
  • 491
  • 1
  • 7
  • 21
0
votes
2 answers

Rest-assured JsonPath working in JUnit Test but not when deployed in application (Weblogic)

A little background first. I have an application that is deployed in Weblogic. It receives a Json response from a Service. I'm trying to use JsonPath to navigate the tree and I'm having an unusual issue. I'm using Maven to build/deploy the…
Shino
  • 99
  • 12
-1
votes
0 answers

Rest Assured getting TLS10 protocol handshakeSSLexception

I am working on rest assured to test the rest APIs. When I am hitting my rest api through rest assured I got below error in some of the api not in all apis. ERROR - "javax.net.ssl.SSLHandshakeException: The server selected protocol version TLS10 is…
-1
votes
1 answer

Getting an error Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.reflection.ReflectionCache

getting an error while executing the Rest Assured program Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.reflection.ReflectionCache at…
-1
votes
2 answers

How can I get value of Medicine inside prescription from the response body as given below in Rest Assured?

[ { "id": "abd88c05-2919-45f2-b1d0-c99af140bbb0", "order_id": "2ddc8302-34e0-437c-8e77-0e0ca80c18ad", "user_id": "00000000-0000-0000-0000-000000000001", "prescription":…
-1
votes
1 answer

Restassured-Getting Specification to merge with cannot be null

I am using the API as a reusable same API is used to get values for different dates.Only date is getting changed so i have used Request Specification but when i try to run getting the error message as Specification to merge with cannot be nullError…
fareen taj
  • 3
  • 1
  • 5
-1
votes
1 answer

How to find value from Object using another value with jsonpath?

Example JSON file: { "propertyName1": { "name": "Anthony", "age": 10 }, "propertyName2": { "name": "Eric", "age": 12 } } I need to find the name which age is 10 for example ("properyName1.find{it.age == '10'}.name"). is not…
Norayr Sargsyan
  • 1,737
  • 1
  • 12
  • 26
1 2 3
25
26