2
votes
Accepted
Variables in jsonpath expression
It's possible to use JMeter Variables (or functions) in JSON Extractor JsonPath expressions, your syntax is simply incorrect (you can check it yourself using Debug Sampler)
My expectation is that you ...
1
vote
Accepted
Avoiding a NPE when checking JSON response using JsonPath and Rest Assured
String response =RestAssured.get("https://praveendvd.free.beeceptor.com/test").
then().extract().response().asString();
JSONObject jsonObj = new JSONObject(...
1
vote
Getting an error while trying to run a script using Rest-Assured library
Looking at that stracktrace, the regular expression used for the matching is recursing infinitely causing a stackoverflow exception.
Your search criteria is likely being translated into a regex ...
1
vote
Accepted
Extract multiple JsonPath values from returned Response using Rest Assured
JsonPath that is used in RestAssured uses the different syntax. Your path would look like cust.findAll{i -> i.name == 'STATUS_ID' || i.name == 'RENEWAL_ID'}.id. Here is the example code:
package ...
1
vote
How to extract a value from a JSON response with Java and Rest-Assured
What you are showing is called a JSON object. Unless you're in JavaScript (that can natively parse JSON data) you can use a jsonpath language that is very similar to xpath (serves for similar purpose)....
1
vote
Rest-assured. Is it possible to extract JSONObject/JSONArray from response json?
Why is this not an option?
JsonPath resJson= new JsonPath(response);
JsonPath referrenceJson= new JsonPath(jsonTOCompare);
Assert.assertEquals(resJson.get("fields"), referrenceJson.get("fields"));
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
jsonpath × 6rest-assured × 5
java × 4
json × 2
selenium-webdriver × 1
jmeter × 1
api-testing × 1
rest-api × 1
regex × 1