Learn REST API Automation Using REST Assured

Video description

REST Assured is a powerful set of APIs used to automate RESTful APIs/RESTful web services (just like Selenium WebDriver for web applications). Almost all web applications use REST APIs to communicate with the backend and it has gained a lot of popularity in modern-day application architecture. It is very important for QA/automation engineers to understand how to automate REST API tests. Automating REST API tests are crucial for projects because REST API tests are quick to run and more stable, unlike web automation. 75% of the IT industry is now moving toward REST API automation.

Explore the world of REST API with this hands-on course. You will not only learn the concepts from scratch but also implement them during your course of learning.

This course starts from introducing some basic concepts of APIs, followed by setting up REST Assured using Maven. After that, you see POST, PUT, and DELETE operations and logging of the REST Assured library. Then, you will be handling request parameters, working with headers and cookies, and authentication. Then, you will see XML and JSON schema validation and WireMock. Finally, you will look at various miscellaneous operations.

By the end of this course, you will have complete knowledge of REST API automation testing using REST Assured.

What You Will Learn

  • Install Postman, and understand XML and JSON schema validation
  • Understand various types of logging in REST Assured
  • Work with headers and cookies and HTTP methods
  • Use OAuth 1.0 and OAuth 2.0
  • Look at XML namespace validation and Response Aware Matcher
  • Create Mock WebService using WireMock

Audience

This course is designed for the QE automation engineer, Selenium WebDriver automation aspirant, manual testing professional willing to jumpstart their automation career, and QTP/UFT professional wanting to switch to API automation as per testing market demand. This course will benefit the QE manager exploring better automation solutions for their project, and fresh graduates looking to learn (coding and automation) a quick new skill that has a high demand in the job market.

Basic knowledge of Core Java is required for quick understanding.

About The Author

Mayur Deshmukh: Mayur Deshmukh is a founder and instructor at De ZINNIA Learning, which is a company dedicated to providing industry-standard training on software automation testing tools and programming languages. Their programs include extensive hands-on training in Java, C#, Python, Selenium WebDriver, Appium, TestNG, Cucumber (BDD), continuous integration, Jenkins, REST, SOAP API automation, WireMock, and Gatling load testing. Mayur motivates his students to keep up a learner’s attitude to be able to adopt new technologies to sustain and grow in this dynamic software industry.

Table of contents

  1. Chapter 1 : Basics Concepts of APIs
    1. What Is an API?
    2. Postman Basics
    3. API Methods
    4. HTTP Status Codes
    5. REST Versus SOAP
    6. What is REST Assured?
    7. JSON and JSON Path
    8. JSON Schema
  2. Chapter 2 : Getting Started with REST Assured
    1. REST Assured Setup Using Maven
    2. Simple Get Request
    3. Validate JSON Response
    4. Validate XML Response
    5. Extracting Response Data
    6. Extracting Single Value from Response
    7. Verifying Status Line
  3. Chapter 3 : POST, PUT, and DELETE
    1. POST Using File
    2. POST Using JSON Object
    3. PUT Operation
    4. DELETE Operation
  4. Chapter 4 : REST Assured Logging
    1. Log All
    2. Log Body and Headers
    3. Log Cookies and Status
    4. Log If Error
    5. Log If Validation Fails
  5. Chapter 5 : Handling Request Parameters
    1. Query Parameters
    2. Multiple Query Parameters
    3. Multi-Value Parameters
    4. Path Parameters
    5. Form Parameters
  6. Chapter 6 : Working with Headers and Cookies
    1. What Are Headers?
    2. Sending Request Headers
    3. Sending Headers Using Objects
    4. Sending Cookies
    5. Sending Cookies Using Builder
    6. Validating Response Headers
    7. Extracting Response Headers
    8. Extracting Response Cookies
  7. Chapter 7 : Authentication
    1. Basic and Digest Auth
    2. 'scribejava' Maven Dependency for OAuth
    3. OAuth 1.0
    4. Twitter OAuth Example
    5. OAuth 2.0
  8. Chapter 8 : XML and JSON Schema Validation
    1. JSON Schema Validation
    2. XML DTD Schema Validation
    3. XML XSD Schema Validation
  9. Chapter 9 : WireMock: WebService Virtualization
    1. Why API Mocking?
    2. WireMock Setup
    3. Running Mock Server on HTTP / HTTPS Ports
    4. Writing WireMock Stubs
    5. Stub Mapping with 'File' Body
    6. Recording WireMock Stub Mappings
  10. Chapter 10 : Miscellaneous Operations
    1. Specifying Request Port
    2. Default Configuration Setup in REST Assured
    3. Validating Response Time
    4. XML Namespace Validation
    5. Validating Response Using Response Parts
    6. Response Aware Matcher

Product information

  • Title: Learn REST API Automation Using REST Assured
  • Author(s): Mayur Deshmukh
  • Release date: December 2021
  • Publisher(s): Packt Publishing
  • ISBN: 9781803245058