Rest Assured API Testing Tutorial | Serialization and Deserialization in RestAssured | Day 17

  Рет қаралды 27,719

The Testing Academy

The Testing Academy

Күн бұрын

In this video, We are going to learn How to work Serialization and Deserialization Objects in RestAssured
Using Jackson 2 APIs.
🚀 Download PPT : scrolltest.com...
🚀 Download Code : scrolltest.com...
✅ What you are going to learn?
1. Create your own rest assured pojo. - scrolltest.com...
2. What is serialization?
3. What is deserialization?
4. Example of Serialization and Deserialization Objects in RestAssured
5. How to serialize an object?
6. How to deserialize into the object?
7. Example of rest assured deserialize list and normally rest assured deserialize json array
What is Serialization?
* Serialization is the process of converting objects into a stream of data.
* The serialization and deserialization process is platform-independent, it means you can serialize an object in a platform and deserialize in different platform.
🚀 All 30 Days Task - scrolltest.com...
📌 Join 30 Days Challenge Updates - scrolltest.com...
🎓 Free Automation MasterClass - thetestingacad...
📚 REST API testing with Python - masterapitesti...
✅ How to Serialize an object?
* Data that is exchanged between client and server is of JSON format.
* Serialize objects into a stream of JSON data and deserialize stream of data to objects that are exchanged between the REST web service.
✅ What is Deserialization?
Deserialization is the process of converting a stream of data into objects.
The main purpose of serialization and deserialization is to persist the data and recreate whenever needed.
✅ How to deserialize into the object?
* Rest Assured can use the Jackson 2 library, GSON library or Jackson library for serialization and deserialization.
* Jackson 2 library for serialization and deserialization purposes.
✅ REST Assured ObjectMapper Serialization with JSON
Often when you are using REST Assured, you will want to serialize a POJO (Plain old Java Object) and send that in your API call. Or you might want to take the API response and de-serialize the body to a POJO.
✅ JSON Serialization & JSON De-Serialization
JSON is a format that encodes objects in a string. Serialization means to convert an object into that string, and deserialization is its inverse operation (convert string to object)
✅ What is REST Assured?
REST Assured is a Java library that provides a domain-specific language (DSL) for writing powerful, maintainable tests for RESTful APIs. ... I'll be using real-world code examples you can copy, run, and reuse directly in your own test automation effort
🌍 Test Automation -
bit.ly/learnau...
💌 API Testing -
www.learnapite...
🎙 Cypress Tutorial with LIVE Projects -
cypresstutoria...
📝 REST API testing with Python -
masterapitesti...
#restassured #restassuredtutorial #apitesting #api #automationtesting #manualtesting #testautomation #thetestingacademy #scrolltest

Пікірлер: 27
@HealthAndWealthCC
@HealthAndWealthCC Жыл бұрын
Thanks a lot Pramod. I learned watching your video. For those who are getting wrong result in 25:20, Please print Arrays.toString(allBlogs) which get you all elements in array in String rather than printing array Address
@bindunagaraj123
@bindunagaraj123 3 жыл бұрын
very nicely explained. It cleared my doubts about the serialization concept. Good Job Pramod. Thank you for sharing ur knowledge. This is the best channel about API Testing that I have ever come across.
@8956311152
@8956311152 3 жыл бұрын
You explained very well!! One quick question- When we use JSONPath and when we use Serialization and Deserialization?
@alim241081
@alim241081 2 жыл бұрын
jab payload bht big hai then we should use pojo.
@prasannapadmagirwar6233
@prasannapadmagirwar6233 6 ай бұрын
25:09 here you converted the GET response to an array of type BlogPost but it didn't work since you tried printing the object of that array.. So, insted of getting the desired result you ended up printing the address of the object of that array..
@SineQuaNon1
@SineQuaNon1 Жыл бұрын
thanks man, you saved and made my day.
@blablagswjsvsns134
@blablagswjsvsns134 2 жыл бұрын
@The Testing Academy What if I change the user variable name ? how basically it map internally ?
@gayl2960
@gayl2960 3 жыл бұрын
Pramod you set data for one person right? what if i need to set data for 100 people?should i set data 300 times??? Can you plzz reply me ,plzzzzzz?
@TheTestingAcademy
@TheTestingAcademy 3 жыл бұрын
You can se loop to do that
@gayl2960
@gayl2960 3 жыл бұрын
@@TheTestingAcademy it would be great if ypu also cover it in your videos.it would be good for those like me who are just beginners.i liked ur videos so useful .Million times thanks Pramod!👍
@bindunagaraj123
@bindunagaraj123 3 жыл бұрын
To set data Obviously we need to send data.So u have to write data in one or the other way , but if u have any file which has all data u need to add , then use excel reader/or anything with respect to ur file and in setter method send them using loop
@gayl2960
@gayl2960 3 жыл бұрын
@@bindunagaraj123 can u show me in practise plzzz if u havw anything like that plzzz.
@Cool94_4u
@Cool94_4u 4 жыл бұрын
Good work bro... appreciate ur efforts...
@TheTestingAcademy
@TheTestingAcademy 4 жыл бұрын
Thanks for the awesome feedback ❤️
@amarpc3532
@amarpc3532 2 жыл бұрын
Can you please explain me i have lenghy json code but i have to convert java object but i am getting confusions how to do
@TheTestingAcademy
@TheTestingAcademy 2 жыл бұрын
Email at contact@thetestingacademy.com
@amarpc3532
@amarpc3532 2 жыл бұрын
@@TheTestingAcademy can you tell me how to do the file is not delivering through mail
@amarpc3532
@amarpc3532 2 жыл бұрын
@@TheTestingAcademy can you send again mail id
@gayl2960
@gayl2960 3 жыл бұрын
After deserializing all blockposts how do you validate them with expected data???
@TheTestingAcademy
@TheTestingAcademy 3 жыл бұрын
Use loop
@dewanganskitchen1117
@dewanganskitchen1117 2 жыл бұрын
I have payload { "authorized users": [ { " first name" :" john", "last name":" kesly" } ] } Map arr=new LinkedHashMap(); arr.put("first name","john"); arr.put("last name","kesly"); Map body=new LinkedHashMap(); body.put("authorized users",arr); given().contentType("application/json").body(body); When I hit this I am getting error { "reason": Invalid type: object (expected array)" } How to resolve this issue? In this case how to convert map into array ? How to write a code for this ? Can you please help me on this ?
@ivanstrelka3448
@ivanstrelka3448 3 жыл бұрын
it would be great to give a link to the github repository. Thanks
@TheTestingAcademy
@TheTestingAcademy 3 жыл бұрын
Github.com/apitestingco
@TheTestingAcademy
@TheTestingAcademy 3 жыл бұрын
Github.com/pramoddutta
@ivanstrelka3448
@ivanstrelka3448 3 жыл бұрын
@@TheTestingAcademy thanks man 👨
@sudarsantenneti
@sudarsantenneti 3 жыл бұрын
Bro, 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 support binary files?
@TheTestingAcademy
@TheTestingAcademy 3 жыл бұрын
Email at contact@thetestingacademy.com
Serialization and DeSerialization in Rest Assured
22:51
Testers Talk
Рет қаралды 1,1 М.
💩Поу и Поулина ☠️МОЧАТ 😖Хмурых Тварей?!
00:34
Ной Анимация
Рет қаралды 1,6 МЛН
🍉😋 #shorts
00:24
Денис Кукояка
Рет қаралды 2 МЛН
API automation using Rest Assured - Zero to hero in 20 minutes
18:02
Fun Doo Testers
Рет қаралды 150 М.
Using JSON IN C#! Serialization & Deserialization made easy!
14:47
tutorialsEU - C#
Рет қаралды 31 М.
Java - Serialization & Deserialization
16:10
TutorialsPoint
Рет қаралды 145 М.
13 - Top 10 REST-Assured API Automation Interview Questions And Answers.
47:30
Software Testing And Automation
Рет қаралды 79 М.
💩Поу и Поулина ☠️МОЧАТ 😖Хмурых Тварей?!
00:34
Ной Анимация
Рет қаралды 1,6 МЛН