07 - Create Complex Nested Post Request body Using POJO Classes in RestAssured

  Рет қаралды 13,658

Software Testing And Automation

Software Testing And Automation

Күн бұрын

Here is the link of Full Play List ► bit.ly/2BY0vHu
Here you will learn how to create a Complicated Post Request body on Runtime Using POJO Classes.
Additional Info
Link for SDET/QA Interview Full Play List ► bit.ly/3frBpQZ
Link for API Testing Full Play List ► bit.ly/2BY0vHu
Link for Cypress Tutorial Full Play List ► bit.ly/3iMdi2a
Link for Web-services Full Play List ► bit.ly/3bfK0Ef
Link for Protractor Testing Full Play List ► bit.ly/2ztlEIK
Link for Java Programs for Software Testers Full Play List ► bit.ly/2ZGeBFC
Link for Java Tutorial Full Play List ► bit.ly/2Z3tP8L
Link for Selenium Tutorial Full Play List ► bit.ly/3vFR9X5
Link for TestNG Full Play List ► bit.ly/3jGJ3YT
Please subscribe to our channel ► bit.ly/2UIvFcm
and press the bell icon to get updates on latest tutorial.
#softwaretestingandautomation #subhasishmishra #softwaretesting #selenium #apitesting #java #restassuredapiautomation #testng #sql #unix #automationtesting #softwaretestinginterviewquestionandanswers #testautomation

Пікірлер: 57
@prikalpanda7864
@prikalpanda7864 Жыл бұрын
*As a newbie to API Automation testing I am finding this series very very helpful and confident to quickly learn and deliver in my company. A big THANKS to U.*
@SoftwareTestingAndAutomation
@SoftwareTestingAndAutomation Жыл бұрын
I am glad to hear that 😊 Thank you !!!!!
@madhusudandevaraju1207
@madhusudandevaraju1207 4 жыл бұрын
Thanks a lot. This gave me a new dimension to my idea of implementation.👍
@SoftwareTestingAndAutomation
@SoftwareTestingAndAutomation 4 жыл бұрын
Welcome. Keep learning new things 🙂
@surajtiwary7350
@surajtiwary7350 Жыл бұрын
Great content
@SoftwareTestingAndAutomation
@SoftwareTestingAndAutomation Жыл бұрын
Thank you 😊
@Vishalfootball
@Vishalfootball 3 жыл бұрын
amazing video brother... i was literally searching for this since 3 days...
@SoftwareTestingAndAutomation
@SoftwareTestingAndAutomation 3 жыл бұрын
Thank you 😊 Keep sharing with your friends.
@Vishalfootball
@Vishalfootball 3 жыл бұрын
@@SoftwareTestingAndAutomation sure bro i wanted more complex cases in nested json and multiple arrays for pojo creation. do u have those videos. would be great if yes
@SoftwareTestingAndAutomation
@SoftwareTestingAndAutomation 3 жыл бұрын
I don't ve any more specific videos but I hope with this video you should able to manage any complex Jsons. If you are facing any issues you can post me that complex Json, I can create a video on that. Also you can refer the complete API automation playlist for better understanding.
@Vishalfootball
@Vishalfootball 3 жыл бұрын
@@SoftwareTestingAndAutomation amazing thanks sir
@sudeeshkumar7006
@sudeeshkumar7006 3 жыл бұрын
Hi could you make a video where we get the input from Excel and passing to it instead of hardcoding. It will be very helpful. Thanks
@SoftwareTestingAndAutomation
@SoftwareTestingAndAutomation 3 жыл бұрын
Sure Sudeesh. I will create a video on that.
@pardonmhlanga2192
@pardonmhlanga2192 3 жыл бұрын
@@SoftwareTestingAndAutomation is there a video which explains the same with data driven approach that you manage to find
@alfredabate3176
@alfredabate3176 Жыл бұрын
Excellent job! I have been looking for a way to generate payload automatically. This is tremendous help!!! Thank you very much
@SoftwareTestingAndAutomation
@SoftwareTestingAndAutomation Жыл бұрын
Glad it helped!!! Thank you 😊
@gm4afsal
@gm4afsal 3 жыл бұрын
You are a life savior! :D
@SoftwareTestingAndAutomation
@SoftwareTestingAndAutomation 3 жыл бұрын
Thank you 😊
@sourinroy992
@sourinroy992 3 жыл бұрын
Hi Subhasish, I just passed the complete json body through an external file as you showed in your previous video and it worked for me. I found the external file approach quite easier, does industries prefer to use pojo class instead of external file?
@SoftwareTestingAndAutomation
@SoftwareTestingAndAutomation 3 жыл бұрын
If your request body is static data, sending as as external file is good. But if you have to modify your payload as per different testing scenarios, in that time pojo is a better option.
@brookf5
@brookf5 3 жыл бұрын
Well explained. Thank you.
@SoftwareTestingAndAutomation
@SoftwareTestingAndAutomation 3 жыл бұрын
Glad it was helpful! Keep learning new things :-)
@kayalvizhigoogle
@kayalvizhigoogle 3 жыл бұрын
Amazing! thank you!
@SoftwareTestingAndAutomation
@SoftwareTestingAndAutomation 3 жыл бұрын
welcome 😊
@AfwanKhan232
@AfwanKhan232 6 ай бұрын
Sir, Please respond , Have you created any vedio on how to parse Dynamic and Nested JSON in Java ?
@gurumurthys1914
@gurumurthys1914 3 жыл бұрын
Thanks and nicely explained , is it possible to create an video framework level for rest api ,so that we may have knowledge at framework level
@SoftwareTestingAndAutomation
@SoftwareTestingAndAutomation 3 жыл бұрын
Thank you. I will create a video on framework soon.
@WorldReviews24
@WorldReviews24 3 жыл бұрын
Hello Subhasish , will you develop a framework level series for RestAssured?
@SoftwareTestingAndAutomation
@SoftwareTestingAndAutomation 3 жыл бұрын
Yes it is in my bucket list, it may take little more time.
@chetanreddybathula7023
@chetanreddybathula7023 3 жыл бұрын
Thank you very much bro it helped a lot
@SoftwareTestingAndAutomation
@SoftwareTestingAndAutomation 3 жыл бұрын
Glad to hear that 😊 keep sharing with your friends.
@amitrath839
@amitrath839 3 жыл бұрын
Thanks a lot sir. In our project, we have few request parameters like "cipher.firstName", is it possible to handle through POJO classes or we have to depend on the hashMaps, as we cannot create variable such as "private String cipher.firstName ". Could you please help me on this.
@SoftwareTestingAndAutomation
@SoftwareTestingAndAutomation 3 жыл бұрын
Please paste your sample request here and let me check
@ashishdixit8627
@ashishdixit8627 2 жыл бұрын
Hi @Software Testing And Automation how do I post more than one Objects in single array using Rest API.
@SoftwareTestingAndAutomation
@SoftwareTestingAndAutomation 2 жыл бұрын
You can use same technique. Let me know your payload, ll help you.
@ss-do1bp
@ss-do1bp 2 жыл бұрын
Hello sir, Is it possible to create POJO from get request response body and compare it with predefined POJO for validation
@SoftwareTestingAndAutomation
@SoftwareTestingAndAutomation 2 жыл бұрын
Technically you will able to do it. But why do you need it ?
@sivakrishnat5471
@sivakrishnat5471 2 жыл бұрын
what I want is reverse of this. That means from postman I will get complex json. Then I have to map that to pojo. Can you do that? thanks in advance. update: thanks your video helped me to fix my issue. for some reason @SerializedName is not working. So I used same name as in pojo declaration. it is working fine now.
@SoftwareTestingAndAutomation
@SoftwareTestingAndAutomation 2 жыл бұрын
That's great. Thank you.
@flight_of_phoenix
@flight_of_phoenix 3 жыл бұрын
Hi Subhashish, I am not able to serialize the array of values e.g. "options": [ "New York Bulls", "Los Angeles Kings", "Golden State Warriros", "Huston Rocket" ], and also nested arrays like this "members" : [ { "name" : "Molecule Man", "age" : 29, "secretIdentity" : "Dan Jukes", "powers" : [ "Radiation resistance", "Turning tiny", "Radiation blast" ] }, Here I am not able to serialize powers. I tried to add a list of powers to members but it is giving an error. I had created a nested static class like this SuperHeroPojo.Members.Powers pow=new SuperHeroPojo.Members.Powers(); pow.setS1("magic"); Please help
@SoftwareTestingAndAutomation
@SoftwareTestingAndAutomation 3 жыл бұрын
Create two classes like "TPojo" and "ComplexJson" like I ve given below and check the console output. Hope that should help you. public class TPojo { private String[] options; private List members; public String[] getOptions() { return options; } public void setOptions(String[] options) { this.options = options; } public List getMembers() { return members; } public void setMembers(List members) { this.members = members; } public static class Members{ private String name; private Integer age; private String secretIdentity; private String[] powers; public String getName() { return name; } public void setName(String name) { this.name = name; } public Integer getAge() { return age; } public void setAge(Integer age) { this.age = age; } public String getSecretIdentity() { return secretIdentity; } public void setSecretIdentity(String secretIdentity) { this.secretIdentity = secretIdentity; } public String[] getPowers() { return powers; } public void setPowers(String[] powers) { this.powers = powers; } } } -------------- public class ComplexJson { public static void main(String[] args) throws IOException { List memb = new ArrayList(); TPojo.Members m= new Members(); m.setName("Molecule Man"); m.setAge(25); m.setSecretIdentity("Dan Jukes"); m.setPowers(new String[] {"Radiation resistance","Turning tiny","Radiation blast"}); memb.add(m); TPojo tp= new TPojo(); tp.setOptions(new String[] {"New York Bulls","Los Angeles Kings","Golden State Warriros","Huston Rocket"}); tp.setMembers(memb); ObjectMapper objectMapper= new ObjectMapper(); String convertedJson=objectMapper.writeValueAsString(tp); System.out.println("convertedJson is " +convertedJson); } }
@flight_of_phoenix
@flight_of_phoenix 3 жыл бұрын
@@SoftwareTestingAndAutomation Thanks Guru
@yogeshnarayanupadhyay7451
@yogeshnarayanupadhyay7451 3 жыл бұрын
Sir can u give this JSON Data which is you used so we can use it and write for practice purpose
@SoftwareTestingAndAutomation
@SoftwareTestingAndAutomation 3 жыл бұрын
Please find the payload { "instructor": "Subhasish", "url": "softwaretestingandautomation.com", "services": "Software Testing", "expertise": "Testing", "courses": { "webAutomation": [ { "courseTitle": "Selenium", "price": 4000 }, { "courseTitle": "Protractor", "price": 5000 } ], "apiAutomation": [ { "courseTitle": "RestAssure", "price": 5000 }, { "courseTitle": "SOAP API Automation", "price": 3000 } ], "mobileAutomation": [ { "courseTitle": "Appium", "price": 5000 } ] }, "linkedIn": "linkedinId" }
@yogeshnarayanupadhyay7451
@yogeshnarayanupadhyay7451 3 жыл бұрын
@@SoftwareTestingAndAutomation thanks sir
@brookf5
@brookf5 3 жыл бұрын
Could you please make a video on oauth2
@SoftwareTestingAndAutomation
@SoftwareTestingAndAutomation 3 жыл бұрын
sure I will make it.
@SoftwareTestingAndAutomation
@SoftwareTestingAndAutomation 3 жыл бұрын
Here is the video link on Oauth2 kzbin.info/www/bejne/m6WaeoZ8bp6En80 and kzbin.info/www/bejne/fKSbl6aoo8x8abM
@sudhakarthangavelu7164
@sudhakarthangavelu7164 3 жыл бұрын
Please Share the link to download the code
@SoftwareTestingAndAutomation
@SoftwareTestingAndAutomation 3 жыл бұрын
I have not added it in Git, ll share once I do it.
@sonaliganguly2543
@sonaliganguly2543 3 жыл бұрын
Sir I'm stuck in a post request of my project. Can I send you the Request , if I get your email id?
@SoftwareTestingAndAutomation
@SoftwareTestingAndAutomation 3 жыл бұрын
sure, send it to subhasishhelpinghand@gmail.com
@sonaliganguly2543
@sonaliganguly2543 3 жыл бұрын
@@SoftwareTestingAndAutomation please check Sir, email sent.
@SoftwareTestingAndAutomation
@SoftwareTestingAndAutomation 3 жыл бұрын
Responded, please check.
08 - Serialization in REST-Assured API automation Testing.
13:41
Software Testing And Automation
Рет қаралды 2,5 М.
escape in roblox in real life
00:13
Kan Andrey
Рет қаралды 77 МЛН
Players vs Corner Flags 🤯
00:28
LE FOOT EN VIDÉO
Рет қаралды 48 МЛН
04 - Create Post Request body using JSON String data and External JSON File in Rest Assured
13:22
How To Handle OAuth 2.0 In Rest Assured
24:51
Mukesh otwani
Рет қаралды 35 М.
JAVA DTO Pattern Tutorial | Simplify Your Code
19:12
Amigoscode
Рет қаралды 204 М.
13 - Top 10 REST-Assured API Automation Interview Questions And Answers.
47:30
Software Testing And Automation
Рет қаралды 79 М.
Using Generics with PHP
25:55
Laracasts
Рет қаралды 12 М.
Spring ultimate basics: What are Spring Beans and what is the Spring Container?
16:30
escape in roblox in real life
00:13
Kan Andrey
Рет қаралды 77 МЛН