Katalon Studio API Testing 13 | Extracting data from JSON responses and chaining requests

  Рет қаралды 12,668

Automation Step by Step

Automation Step by Step

Күн бұрын

Пікірлер: 60
@pratheepkumar4218
@pratheepkumar4218 3 жыл бұрын
Hi Raghav, in list user how to filter all the Id value. We have a scenario like list pending company to activate using I'd dynamic way.
@RaghavPal
@RaghavPal 3 жыл бұрын
Hi Pratheep, you can store the id in variables and use it later
@dhanushkodiraj6153
@dhanushkodiraj6153 3 жыл бұрын
How to handle arraylist in the Request body? I have a json request something like { "Data": { "ItemsList": [ "value1", "value2","value3", "value4"], "DateTime":"datetimevalue" } } I am trying to check invalid and empty values in Itemslist array. On using Globalvariable.ItemsList, its printing me [value1, value2,value3,value4] If I pass Globalvariable.ItemsList in the script of SendRequest, i am getting 400 error, invalid request params
@RaghavPal
@RaghavPal 3 жыл бұрын
Hi Dhanushkodi , Try to print and check if the data is getting referred properly from Global Variables
@shakuntalan6398
@shakuntalan6398 4 жыл бұрын
Please help with how to add multiple API requests combined in single requests in Python. and to run through postman
@RaghavPal
@RaghavPal 4 жыл бұрын
I will check on this Shakuntala
@albertopelaezrivera3853
@albertopelaezrivera3853 5 жыл бұрын
How can I parameterize default value in Request Body to take it from another stored variable? Thanks
@RaghavPal
@RaghavPal 5 жыл бұрын
Hi Alberto, not sure if I understood your scenario, but you should be able to follow the same steps and syntax (as shown in the video) for parameterizing any value in your request. Where did you face the issue
@albertopelaezrivera3853
@albertopelaezrivera3853 5 жыл бұрын
@@RaghavPal I can explain you what I'm doing. I am automating a CRUD. But my intention is to update and delete the same thing I created for not creating trash in my DB. I need to do this without any manual action. JsonSlurper slurper = new JsonSlurper() Map parsedJson = slurper.parseText(serviceResponse.responseBodyContent) String brandId = parsedJson.id GlobalVariable.brandId = brandId I used this code to equal my created "Id" to a GlobalVariable in order to set it as a variable in my update request body, but I don't know if it's good to use a Global variable, or if it would be better to use a local or a private.
@RaghavPal
@RaghavPal 5 жыл бұрын
If you want to refer this value in some other test case or other location, you will have to store in GlobalVariables
@albertopelaezrivera3853
@albertopelaezrivera3853 5 жыл бұрын
@@RaghavPal Thanks Raghav, your videos helped me to finish my CRUD automation.
@test-jx7gj
@test-jx7gj 5 жыл бұрын
Is there a way to get and parse the JSON response as variable in another test case. I have a test case which sends the text message, the message should be a Json value. Please advise
@RaghavPal
@RaghavPal 5 жыл бұрын
Hi do you want to store complete json msg in a variable, can do programatically
@BIRDSCAMPBD
@BIRDSCAMPBD Жыл бұрын
How to get Advance course directly from you?
@RaghavPal
@RaghavPal Жыл бұрын
Hi, Can check all courses here - automationstepbystep.com/
@kushalpanchal5571
@kushalpanchal5571 5 жыл бұрын
Hi Raghav, Can we parameterize the HTTP Body Payload by using Internal Test Data in Katalon Studion
@RaghavPal
@RaghavPal 5 жыл бұрын
Yes you can Kushal, just parameterize the data using variables. Add your request in a test case and then add test case in a test suite. In test suite you can refer data file as shown here kzbin.info/www/bejne/qqaYi5ZubtxppbM
@aalokmayekar7214
@aalokmayekar7214 5 жыл бұрын
Hi, is there any way to get the count of first_name?
@RaghavPal
@RaghavPal 5 жыл бұрын
Hi Aalok, you should be able to. Check this docs.katalon.com/katalon-studio/docs/ws-verify-elements-count.html#example
@rizwan3564
@rizwan3564 2 жыл бұрын
How to validate the json schema in katalon?
@RaghavPal
@RaghavPal 2 жыл бұрын
Hi Rizwan, this will help forum.katalon.com/t/justify-a-json-schema-validator-in-katalon-studio/25560
@anu017
@anu017 4 жыл бұрын
Hi Rahav, Thank you very much for your video's. They are really helping a lot. I have one question regarding json sluper. I have written code to connect to so many API's(From Azure Devops) in for loop and get the content and update them in Excel. Actually my code was working perfectly some times. But some times I am getting an error. " Test Cases/Creating Traceability/Traceability Matrix Epic-Test Result FAILED. Reason: groovy.json.JsonException: Unable to determine the current character, it is not a string, number, array, or object The current character read is '
@RaghavPal
@RaghavPal 4 жыл бұрын
Hi Anuradha, seems there is some character in your response body. Just check the line it is pointing to, May have to get some online help
@bongtv3670
@bongtv3670 5 жыл бұрын
Can I extract the value and put it in an excel file?
@RaghavPal
@RaghavPal 5 жыл бұрын
You can, will have to use a custom script
@Jerson0702
@Jerson0702 4 жыл бұрын
Hi there, thanks! This helped me a lot! Another question, what if you want to extract multiple instances?
@RaghavPal
@RaghavPal 4 жыл бұрын
You can use the same process of using JSON path to extract and store values.
@Jerson0702
@Jerson0702 4 жыл бұрын
@@RaghavPal Oh ok, thanks a lot!
@notch7751
@notch7751 5 жыл бұрын
Thanks once again :) this helped a lot
@RaghavPal
@RaghavPal 5 жыл бұрын
You're welcome Notshe
@lawsonconner1611
@lawsonconner1611 3 жыл бұрын
I guess it is pretty off topic but does anyone know a good site to stream new tv shows online ?
@melvinvan3799
@melvinvan3799 3 жыл бұрын
@Lawson Conner I use FlixZone. You can find it by googling =)
@emilioangelo4753
@emilioangelo4753 3 жыл бұрын
@Melvin Van Definitely, been watching on FlixZone for months myself :D
@lawsonconner1611
@lawsonconner1611 3 жыл бұрын
@Melvin Van thank you, I signed up and it seems like a nice service :D I appreciate it!!
@xsimplyellex
@xsimplyellex 5 жыл бұрын
thank you!!! needed this
@RaghavPal
@RaghavPal 5 жыл бұрын
Happy to know
@jayeshdalal7
@jayeshdalal7 5 жыл бұрын
Hi Raghav, Can i use this technique with below cases. case -1 Header let suppose -API1 response is token. and this token is header of API2 . can we parametrized this header like body ? or we need to hardcode that header? case-2 in API endpoint let suppose API is account-staging.abc.com/user/account/email/ here after email some email id like abc@gmail.com (this is not parameter) it is look like account-staging.abc.com/user/account/email/abc@gmail.com? can we do parameterized ? need some suggestion Thanks, jayesh
@jayeshdalal7
@jayeshdalal7 5 жыл бұрын
I found the way to solve case -1 but regarding case -2 (path variable i am unable to find any hint)
@RaghavPal
@RaghavPal 5 жыл бұрын
Hi Jayesh, I checked, you should be able to use the same way for parameterizing url. For e.g. This is my api endpoint thomas-bayer.com/sqlrest Now I want to parameterize the last part sqlrest So I go to variables tab in api request and add a variable url and provide its value and then use in endpoint like thomas-bayer.com/${url} In the variables section you can also refer the value from global variable
@anasswelam9574
@anasswelam9574 4 жыл бұрын
i don't understand groovy code ?!
@RaghavPal
@RaghavPal 4 жыл бұрын
Hi Anas, you can learn Groovy from here - automationstepbystep.com/
@ilmroshni5925
@ilmroshni5925 6 жыл бұрын
make a playlist
@RaghavPal
@RaghavPal 6 жыл бұрын
Hi Roshni, its here - kzbin.info/aero/PLhW3qG5bs-L-yy1HtdxKcp-blmG5qeWgg
Katalon Studio API Testing | Sample SOAP API Testing Project 1 | Introduction
11:46
Automation Step by Step
Рет қаралды 4,9 М.
Katalon Studio API Data Driven Testing
19:23
Automation Step by Step
Рет қаралды 20 М.
One day.. 🙌
00:33
Celine Dept
Рет қаралды 75 МЛН
Cheerleader Transformation That Left Everyone Speechless! #shorts
00:27
Fabiosa Best Lifehacks
Рет қаралды 14 МЛН
So Cute 🥰 who is better?
00:15
dednahype
Рет қаралды 18 МЛН
API Testing with Katalon Studio for POST request and verify the response
29:39
Katalon Studio | How To Get Data From Excel
18:19
Automation Step by Step
Рет қаралды 70 М.
3. Katalon Studio || API Testing || Dynamic Data in Request Body.
14:11
Katalon Studio API Testing 1 | Introduction and Getting Started
18:33
Automation Step by Step
Рет қаралды 72 М.
Karate JSON Schema Validation : Karate API Testing Tutorials
16:47
The Testing Academy
Рет қаралды 10 М.
One day.. 🙌
00:33
Celine Dept
Рет қаралды 75 МЛН