1:52 You said : 'Payload u r converting into object is Serialization. Reverse is Deserialization '. I think you've got confused here as that is Wrong. But, However this video title is still Correct , bcoz what's happening here is : Our Java Object POJO we're passing , which is getting converted to Payload and being sent to server. So Finally to avoid confusion for viewers, Object converted to payload/ Json file (which can then be passed over internet) = Serialization Json File/payload(which we get from internet) is converted back to a JavaObject= Deserialization. Nonetheless, This Playlist was so great. It actually gave me lot of clarity wrt RestAssured.
Hi Mukesh, in createIssueJira class you have issuetype with value TASK and Project with value REST ,payload with value demo1 and demo description, then how in runtime your not getting the same in JSON response
If you create API you have to do above explanation but if you will do TEST not need to do above. JSON payload is a String file. So you can use String Manipulation which is very easy with replace method.
Awesome explanation Mukesh,finally i got the POJO concept .please add some more videos on frame work designing and extracting data from json(nested json array).
Hi Mukesh, you have done a great job , from the main purpose of me studying pojo was i want list type of attribute in pojo becuase the api which is sending me the json object is sending different no. of integers for example- it is sending how much work a user did today then tomorrow then next day..so i wanted to create a list..but i want to know when there is multiple json objects coming where this pojo is storing that..like in this example you shown there was one single json object ..but what is multiple json objects are coming
@mukesh what is the difference between pass payload as json file and the above approach? Is there any performance issue for json file as payload?? please clarify this
Hi Chethan I have not seen any performance issue. We have different ways to send payload so depends on type of payload you can go with any of the approach. If you have static payload then take from file else pojo.
I wanted to know how restassured calls work with TestNg, for example we have multiple restassured calls in the same @test annotation method I wanted to know which is calling first second like that
If we need to send bulk data to create bulk resources on the server using Rest assured, then which approach we should follow and how exactly it can be done. Please reply. thanks
Hey Manish, unfortunately rest assured does not have any method of this type so we need to take help of TestNG to do this. TestNG has dataProvider which run single test multiple times with different set of data. You can call same API multiple time with different set of data.
Hi Mukesh.. Really appreciate for wonderful videos n passing ur expertise knowledge n making our lives at workplace easier... Can we implement multithreading as well in rest assured .. if yes how can v achive the same please guide n suggest..thanks in advance for all ur support...
@@Mukeshotwani thanks for writing back..but you only answered first part of my question 😊🙏 please suggest how to achieve the same do you have any video on the same or any other suggestions
Hi Mukesh, Good work as always. No question on your video, though I was just wondering as always its seems very easy with small sample API in tutorial, but when it comes to real implementation its not that easy. For ex as per your simple sample only we need to have 3-4 pojo classes, then think of a project where one needs to handle 100s of ( of course few of them may have more complex payloads with 50+ fields in there) APIs. Also its not easy to maintain this many pojo classes against changes where we have to add extra fields/nodes to json and remove few or change the values in there ..Can you please suggest any other approach if possible to deal my situation..? Thanks in Advance
Hi Mukesh, Thank you for this Superb Explanation! You have shown how to serailize the Pojo object with ObjectMapper Class...but in 28.16(in Jira exapmle) you passed the Pojo objects only without serializing that and it is able to fetch the API response successfully? How did that happened here...just curious to know..! Dooes it mean serailization is optional when we are testing through RestAssured?
Hi Mukesh, Thank you for great video. Its helpful. Could you please explain in the last part when you passed or copy pasted all different fields in JIRA class you did not use ObjectMapper?
Can you post the video about how to use session filter and cookies filter to access existing session or cookies in two class access the same sessions for parallel test
Thanks ji..currently I send the request in JSON and get the session and set into context...but in test case rest assured we try to run in parellel is it possible to run in possible using session with rest assured
Hi mukesh, Can we do the same process using c# ?..if yes..can u please share the any relevant videos of c# ..In my current project we are using c#.net..thanks for the help
When I convert POJO to JSON, it gets created in a different order. For example, I am expecting field1, field2, field3 { field4, field5, field6}, field7, field8 but I am getting it in field1, field2, field3, field87, field8, field3 { field4, field5, field6} order.
Hi Mukesh, will you please tell me difference between serialization and marshalling. what i know 1. We need a medium for communication between two APIs or two systems which can be JSON/XML/FILE/Plain text 2. For this communication we need to compress our object into stream of bytes e.g: POJO to JSON 3. This conversation is known as serialization 4. But there is also a term known as Marshalling where we convert java object to JSON , so I'm not able to differentiate in both, can you please help, pls differentiate marshalling and serialization
Mukesh, I need some support on creating a framework using RestAssured, will you able to provide? Can I have your number so I can speak to you or any other sources to support me..... thanks Does RestAssured supports binaries?
There were couple of things which you can do, there is site which automatically generate pojos from Json. www.jsonschema2pojo.org/ Also you can use Lombok annotation processor which reduce boilerplate code.
Thank you so much Priyank for www.jsonschema2pojo.org/. I will give a try for this. In our company they dont allow to use these site because of private data but it is very good for public data.
Thank you so much, Mukesh for such a wonderful explanation about POJO
Thank you Dipali.. I am glad to you liked rest assured series.
@@Mukeshotwani yes I like it.. really superb
🙏
1:52 You said : 'Payload u r converting into object is Serialization. Reverse is Deserialization '. I think you've got confused here as that is Wrong. But, However this video title is still Correct , bcoz what's happening here is : Our Java Object POJO we're passing , which is getting converted to Payload and being sent to server.
So Finally to avoid confusion for viewers,
Object converted to payload/ Json file (which can then be passed over internet) = Serialization
Json File/payload(which we get from internet) is converted back to a JavaObject= Deserialization.
Nonetheless, This Playlist was so great. It actually gave me lot of clarity wrt RestAssured.
Thanks Ganesh
You r really putting some good amount of effort. A big Thank you!
So nice of you Saurav Thank you
Last part you explained with diagram is where i understood. Thanks a lot Mukesh for all your effort. :3
Most welcome 😊 Bhai
This is really good. Thank you very much for the detailed explanation and examples. Really appreciate your efforts
Thank you so much Sathish I am glad it helped 🙏🏼
@Mukesh what is the use of object mapper when we are passing the object reference in body for pojo...why do we need object mapper
Superb Explanation, Complete list was helpful Thank you Mukesh :)
Glad you liked it Thank you Soniya
@@Mukeshotwani Please suggest how can we do same thing in AWS ?
Hi Mukesh, in createIssueJira class you have issuetype with value TASK and Project with value REST ,payload with value demo1 and demo description, then how in runtime your not getting the same in JSON response
I used separate project for this demo because I was using docker so I lost my old project.. you can use any project with any data.
If payload is very complex, should we need to go through this approach..or any other option we can use...
Hi Parkash, you can use Lambok for complex payload.
@@Mukeshotwani thanks Mukesh bhai it's very good library.
Awesome Explanation , Some good happens to you
Thank you Ajay bhai.
can we use Hash map also inside pojo class if data is multiple of key values inside the name node ?
Hi Nanda, yes we can use HashMap as well.
If there are multiple complex responses do we need to create POJO classes like these for every response? Or is there any better approach
If you create API you have to do above explanation but if you will do TEST not need to do above. JSON payload is a String file. So you can use String Manipulation which is very easy with replace method.
Awesome explanation Mukesh,finally i got the POJO concept .please add some more videos on frame work designing and extracting data from json(nested json array).
I will try my best Thanks Sunanda
Hi Mukesh, you have done a great job , from the main purpose of me studying pojo was i want list type of attribute in pojo becuase the api which is sending me the json object is sending different no. of integers for example- it is sending how much work a user did today then tomorrow then next day..so i wanted to create a list..but i want to know when there is multiple json objects coming where this pojo is storing that..like in this example you shown there was one single json object ..but what is multiple json objects are coming
@mukesh what is the difference between pass payload as json file and the above approach? Is there any performance issue for json file as payload?? please clarify this
Hi Chethan I have not seen any performance issue. We have different ways to send payload so depends on type of payload you can go with any of the approach. If you have static payload then take from file else pojo.
@@Mukeshotwani thank you
@@Mukeshotwani No Jackson library required?
Hi Mukesh,What if we dont create payload class and name it as fields?
I wanted to know how restassured calls work with TestNg, for example we have multiple restassured calls in the same @test annotation method I wanted to know which is calling first second like that
If we need to send bulk data to create bulk resources on the server using Rest assured, then which approach we should follow and how exactly it can be done. Please reply. thanks
Hey Manish, unfortunately rest assured does not have any method of this type so we need to take help of TestNG to do this. TestNG has dataProvider which run single test multiple times with different set of data. You can call same API multiple time with different set of data.
Hi Mukesh.. Really appreciate for wonderful videos n passing ur expertise knowledge n making our lives at workplace easier...
Can we implement multithreading as well in rest assured .. if yes how can v achive the same please guide n suggest..thanks in advance for all ur support...
Hey Ravi, I am glad my videos are helping you. You can achive multithreading using TestNG.
@@Mukeshotwani thanks for writing back..but you only answered first part of my question 😊🙏 please suggest how to achieve the same do you have any video on the same or any other suggestions
Thanks Mukesh for this video, I have a doubt why we are writing getter and setter methods there, though we are not using it anywhere in the program.
Yes we have used it.
What if we have nested json loop in the payload. How can we create pojo classes of nested json...plzz reply
Hi Mukesh, Good work as always. No question on your video, though I was just wondering as always its seems very easy with small sample API in tutorial, but when it comes to real implementation its not that easy. For ex as per your simple sample only we need to have 3-4 pojo classes, then think of a project where one needs to handle 100s of ( of course few of them may have more complex payloads with 50+ fields in there) APIs. Also its not easy to maintain this many pojo classes against changes where we have to add extra fields/nodes to json and remove few or change the values in there ..Can you please suggest any other approach if possible to deal my situation..? Thanks in Advance
Use String Manipulation it will be easy you can maintenance 100's field in minutes. Don't care payload is very complex or not.
Hi mukesh, please post the link to the previous video where you have used the earlier code, i have just stared with this video. please
Here is the link Tej ruclips.net/video/p81DCbuP2qk/видео.html
Hi Mukesh, Thank you for this Superb Explanation! You have shown how to serailize the Pojo object with ObjectMapper Class...but in 28.16(in Jira exapmle) you passed the Pojo objects only without serializing that and it is able to fetch the API response successfully? How did that happened here...just curious to know..! Dooes it mean serailization is optional when we are testing through RestAssured?
Hi Ritwik, you can pass object, file, String etc while sending payload.Thank you so much for following the videos.
Thank you so much for this series...It is very useful...Can you please provide the code as well?
Hi Mukesh, Thank you for great video. Its helpful.
Could you please explain in the last part when you passed or copy pasted all different fields in JIRA class you did not use ObjectMapper?
Need to know how do you create pojos for multiple json objects like a json array. Please share a tutorial for the same
Hey Pragna, will try to create video on this too.
Can you post the video about how to use session filter and cookies filter to access existing session or cookies in two class access the same sessions for parallel test
Yes Karthi will try to add..
Thanks ji..currently I send the request in JSON and get the session and set into context...but in test case rest assured we try to run in parellel is it possible to run in possible using session with rest assured
How can we validate the id created??
Then why we use @ json property here u only writing the model classes and and use object mapper classes convert in json that it serialization
Sorry pratap, I did not get your question. Can you elaborate your question?
@@Mukeshotwani i want to know why we are using @json property in pojo like method levels setter and getter level
@@pratapjavasingh3239 if you watch video carefully there is one scenario when I dont have same keys for payload then I can use json property.
@@Mukeshotwani now I got it Thanks for the valueable response
Hi mukesh,
Can we do the same process using c# ?..if yes..can u please share the any relevant videos of c# ..In my current project we are using c#.net..thanks for the help
When I convert POJO to JSON, it gets created in a different order. For example, I am expecting field1, field2, field3 { field4, field5, field6}, field7, field8 but I am getting it in field1, field2, field3, field87, field8, field3 { field4, field5, field6} order.
Hey Mukesh How to pass the Json Array Values in Payload
Hi Mukesh, will you please tell me difference between serialization and marshalling.
what i know
1. We need a medium for communication between two APIs or two systems which can be JSON/XML/FILE/Plain text
2. For this communication we need to compress our object into stream of bytes e.g: POJO to JSON
3. This conversation is known as serialization
4. But there is also a term known as Marshalling where we convert java object to JSON , so I'm not able to differentiate in both, can you please help, pls differentiate marshalling and serialization
www.sololearn.com/Discuss/357962/what-is-the-difference-between-marshaling-and-serialization
Nicely explained
Mukesh, I need some support on creating a framework using RestAssured, will you able to provide? Can I have your number so I can speak to you or any other sources to support me..... thanks
Does RestAssured supports binaries?
Yes it supports binary response. Feel free to connect with me for any support mukeshotwani@learn-automation.com
Please create framework for this I'm waiting for that , thanks
Yes Ashutosh will try to make videos soon on this.
Awesome.
Thank you! Cheers!
There were couple of things which you can do, there is site which automatically generate pojos from Json. www.jsonschema2pojo.org/
Also you can use Lombok annotation processor which reduce boilerplate code.
Thank you so much Priyank for www.jsonschema2pojo.org/. I will give a try for this.
In our company they dont allow to use these site because of private data but it is very good for public data.
@@Mukeshotwani , you can explore
org.jsonschema2pojo
api to convert json to pojo for your private data
Thanks a lot
Most welcome Chethan
Very very confusing. No where I could understand the concept. It was taught as if we need to learn on how to do this.
Hey Mayank in order to understand this your java concept should be clear. Can you tell me which statement you could not understand.
Very Confusing
Hi Arvind what is the confusion?
How crpat bash64 payload
Hi Mate, can you share example?