Rest Assured API Testing Tutorial | Serialization and Deserialization in RestAssured

In this video, We are going to learn How to work Serialization and Deserialization Objects in RestAssured
Using Jackson 2 APIs.

πŸš€ Download PPT : https://scrolltest.com/ra/day17
πŸš€ Download Code : https://scrolltest.com/ra/sod

βœ… What you are going to learn?

  1. Create your own rest assured pojo. β€” https://scrolltest.com/pojo
  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 β€” https://scrolltest.com/30days/restassured
πŸ“Œ Join 30 Days Challenge Updates β€” https://scrolltest.com/tta
πŸŽ“ Free Automation MasterClass β€” https://thetestingacademy.com
πŸ“š REST API testing with Python β€” https://masterapitesting.com

βœ… 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 -
https://bit.ly/learnautomation2020

πŸ’Œ API Testing -
https://www.learnapitesting.com

πŸŽ™ Cypress Tutorial with LIVE Projects -
https://cypresstutorial.com

πŸ“ REST API testing with Python -
https://masterapitesting.com

Lead Automation Expert | Blogger |Health Enthusiast https://www.youtube.com/c/thetestingacademy