Questions tagged [json]

JSON (JavaScript Object Notation) is a 100% textual data interchange format originally inspired by JavaScript objects. It is widely used in RESTful web services. Parsers for JSON exist in nearly all languages, and libraries also exist which can deserialize JSON to native objects or serialize native objects to JSON.

Filter by
Sorted by
Tagged with
1
vote
2answers
49 views

JMeter - JSON parse error: Unexpected character

I am trying to add dynamic Post response on one rest API URL(http:IP:9000/page) with data as a JSON request in file format, So to add that file in post body I use the command: {__$FileToString(C:\...
0
votes
1answer
34 views

What is the best way to create complex json in java?

I want to create a request body to test an API. The request body is a complex JSON as below: { "certificate_registry": { "images": [ { "url": "https://path.jpg" } ], ...
0
votes
1answer
22 views

Codeception: test data in annotation - codeception reports undefined variable

I've tried to use this style: https://codeception.com/docs/07-AdvancedUsage#Example-Annotation My example test case is this: /** * @example { "groupid": "16789507", "partnerccdid": "31003704" } */ ...
0
votes
0answers
181 views

Use tv4 to validate schema in postman

I am trying to validate a scheme using tv4 in Postman, but no matter what I do it always passes - even if I force bad data. I am unsure if I am doing something wrong or if there is an issue with tv4 - ...
0
votes
1answer
648 views

How to read data from JSON file , Then Pass these values on web application form with the help of Xpath Locators and Then Write it in Excel file?

Steps : Can you suggest the approach or share some sample script 1.Read data from JSON file - Method to Provide Data (JsonReader.getdata) - Get file location & File Name 2.In @Test(...
2
votes
1answer
58 views

Should I write unit tests when the json schema is validated by a 3rd party library

I have some json data and I would like to validate the data against a defined json schema. I'm using the ajv library for the validation. On the json schema, there are constraint you can specify like ...
0
votes
1answer
273 views

JMeter - Filter in JSON Extractor by JMeter Variable

I'm trying to use the JSON Extractor in JMeter 5.1 to get at a value (an id) in a ReactJS app so that I can use this value in the URL of an api call to a DELETE. My JSON payload looks something like ...
1
vote
1answer
738 views

How to extract multiple named values from a JSON object with jMeter

I want to extract all the serviceItemId's, this object I got it from an external system and I have to verify the contents are correct or not. The used JSON Object: [ [ { "...
0
votes
2answers
395 views

From an Json Object, I am trying to extract the values by using the below code in JSR223 processor

{ "service": "CURBSIDE", "unavailableLines": { "unavailableLine": [ { "unavailableQty": "10.0", "itemLineId": "4", ...
0
votes
1answer
43 views

How to duplicate part of tags in XML in Jmeter

I have this JSON template { "shipToAddress":{ "country":"SE", "emailAddress":"abc@gmail.com", "zipCode":"${zipcode}" }, "itemLines":{ "itemLine":[...
0
votes
1answer
63 views

I am trying to extract a part of Json response, where i am not able to find the correct regex [closed]

{ "shipToAddress":{ "country":"SE", "zipCode":"AB101AA", "emailAddress":"abc@gmail.com" }, "deliveryArrangementsId":"DA100000011", "itemLines":{ "itemLine":[{ "unitWeight":"...
0
votes
1answer
288 views

Rest assured API to get a element from Json response

I'm using restassured.path.json.JsonPath extractor From the below response I would like to extract the customerProductIdentifier where highLevelProduct is HSI, { "recordsChoice": [ { ...
0
votes
1answer
121 views

Json Path extractor using Jmeter

Using Json extractor from the below response I would like to extract the only customerProductIdentifier where highLevelProduct is HSI, and in my next Json extractor similarly would like to extract the ...
0
votes
1answer
548 views

What are the best ways to Automate JSON POST Request using Restassured API

What are the best ways to Automate JSON POST Request using Restassured API. My POST request is too big and all my endpoints requests are too bit. Appreciate your help on this. For Ex: { "...
1
vote
1answer
3k views

What is the simplest way to rewrite Postman requests to C#

I have made lots of made Requests in JSON in Postman. Now I am thinking about re-write all the Postman-tests into C#. There are many different Nuget packages that could be used. I have googled a ...
1
vote
2answers
686 views

How to extract rcAuth Token from header and POST as parameter to call an API

I'm automating email verification process, For that I have an API where I have to pass the emailID with the URL e.g.http://apiqa.somewebsite.in/api/v1/verify-email-qa/narendrarajput@gmail.com and have ...
0
votes
3answers
3k views

JMeter - Post Data passes JSON data

The Project which I am working now require a performance test. So, I preferred JMeter for a load test and started learning one by one. Now, When I recorded a test and included a CSV file for the ...
2
votes
1answer
890 views

How do I save JMeter variables created at runtime?

I'm using JMeter 3.1 to run a http-endpoint test & I need to extract a very small portion of the return JSON I receive. I'm using the JSON Extractor postprocessor element & JSONPath ...
2
votes
1answer
917 views

Jmeter - Json Extractor removing white space causes test to fail

Apologies if this is something fundamental which I should already know. I've got a test set up in jmeter using a Json Extractor. The data which it is extracting is in the format: "data item 1", "data ...
5
votes
1answer
7k views

How to Use Http Request/JSON extractor(using Jmeter Variable) in Jmeter with Response assertion(using Jmeter Variable)

How to Use Http request/JSON extractor(using Jmeter Variable) in Jmeter with Response assertion(using Jmeter Variable). better to provide with Example?
1
vote
1answer
2k views

Using Jmeter How to Match values in Json response with JDBC response?

How to Match values in JSON response with JDBC response? just want to check that correct values passing in JSON response and need to verify that those values are matched with JDBC response (fetching ...
0
votes
3answers
882 views

How to Automate web services using JMETER?

How to Automate web services using JMETER? I need to check URL links are working and image are loading properly and with the response code given. see more details in below example, i just want to ...
1
vote
1answer
7k views

keeping the test data in json format [closed]

This is my selenium code. I am just finish my selenium code. I'm following page object pattern. My code does not follow any frameworks. 1). I want to keep the test data separately. Not ...
1
vote
4answers
2k views

How to compare 2 JSON string having different attributes but same value?

I'm working in a Migration API Testing project also I'm new to API testing. I have this scenario - There are 2 services, Service A and Service B. Service A has the response like this when I request ...
3
votes
3answers
1k views

How do I parse more than one parameters from the response in Jmeter?

Currently, I am using JSON Path Extractor as my POST PROCESSOR to parse parameters from response body. Suppose say I have to parse two parameters from response 'AuthenticationToken' as well as 'userId'...
1
vote
2answers
88 views

How do I capture some portion of logs from a log file?

Basically my requirement/need is to capture some snippet of the logs from a log file (or in other words parse log file)and then check if that portion is a valid JSON also. Any pointers?
0
votes
1answer
949 views

What is the use of waitForPageLoad() method in Framework when our test scripts don't execute unless the page is loaded by default

public void waitForPageLoad(WebDriver driver){ while(true){ String page_status =(String)((JavascriptExecutor)driver).executeScript("return document.readyState"); if(page_status....
1
vote
0answers
104 views

How are JSON Web Token validators tested?

JSON Web Tokens (JWTs) are an open, industry standard method for representing claims securely between two parties. There are numerous implementations for JWT verification but it looks like each ...
6
votes
6answers
27k views

Suggest me the best way to automate REST web services with JSON using Java

I was testing web services manually using Postman or REST client. I want to automate testing here. I use REST with JSON format. Questions: How to use target URL ? How to pass header values? How to ...
0
votes
2answers
42 views

Why are there JSon processors in Jmeter

I know that JSON is another way for data transmission like XML. Now there might be some data transmitted with JSON tags (like in xml tags). so my questions is why people are using JSON. secondly how ...
1
vote
1answer
863 views

JSON Assertions in CA LISA

Has anybody tried scripting json response assertions in CA LISA Tool. All I could find was string match where I was giving "key":" value" exactly to ensure the presence of that combination in my web ...