Тёмный

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

The Testing Academy
Подписаться 167 тыс.
Просмотров 28 тыс.
50% 1

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

Опубликовано:

 

30 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 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
@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..
@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
@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.
@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.
@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
@blablagswjsvsns134
@blablagswjsvsns134 2 года назад
@The Testing Academy What if I change the user variable name ? how basically it map internally ?
@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.
@gayl2960
@gayl2960 3 года назад
After deserializing all blockposts how do you validate them with expected data???
@TheTestingAcademy
@TheTestingAcademy 3 года назад
Use loop
@SineQuaNon1
@SineQuaNon1 Год назад
thanks man, you saved and made my day.
@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 👨
@Cool94_4u
@Cool94_4u 4 года назад
Good work bro... appreciate ur efforts...
@TheTestingAcademy
@TheTestingAcademy 4 года назад
Thanks for the awesome feedback ❤️
@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 ?
Далее
REST Assured Beginner Tutorial 6 | GET & POST
22:06
Просмотров 76 тыс.
Rest Assured | 14 | what is a POJO? | தமிழ்
13:36
API Automation using Rest Assured - BDD Framework
29:29