REST API Automation Testing from Scratch - REST Assured Java

Video description

Start from scratch and go through advanced REST API framework levels with the help of real-world examples

About This Video

  • Get a solid understanding of REST API automation using REST assured with real-time examples
  • Design and implement structured API automation frameworks with REST assured API
  • Become familiar with REST manual testing tool, Postman

In Detail

Explore the world of REST API with this hands-on course. You'll not only learn the concepts from scratch but also find out how giant companies such as Jira, Twitter, Facebook, and Google Maps are using REST API to automate their services.

The course starts with the basics of REST API and proceeds toward brushing up your Java skills. Next, you'll become familiar with the concept of Postman and test APIs with Postman. As you advance, you'll discover different types of REST requests and set up the REST assured environment for automation. Next, you'll optimize scripts to match framework standards and closely study the grant type authorization flow with an interesting example. Moving ahead, you'll solve complex queries from JSON with simple POJO methods and learn to automate APIs with the help of many examples. Towards the end, you'll migrate a project to the TestNG framework and understand the importance of Maven in framework development.

By the end of this course, you'll have complete knowledge on REST API automation testing.

Publisher resources

Download Example Code

Table of contents

  1. Chapter 1 : REST API Basics and Terminology
    1. Introduction to REST API
    2. Introduction to REST API and Where it is Used in Project Architecture
    3. Understanding GET, POST, PUT DELETE, HTTP, and CRUD Operations of API
    4. Path, Query Parameters, and Headers in REST API
  2. Chapter 2 : Getting Started with REST API Testing
    1. Introduction to Postman and Google Maps APIs
    2. Understanding the Add Place API and Executing it Through Postman
    3. Understanding the Get and Delete Place API using GET and DELETE HTTP Methods Through Postman
    4. Understanding the Update Place API Using the PUT HTTP Method Through Postman
  3. Chapter 3 : REST Assured Setup for API Automation Testing
    1. Introduction to Test APIs
    2. Setting Up a Test Project with REST Assured API
    3. Building a REST API Automation Testing Framework to Add Places and Validate Status Codes
  4. Chapter 4 : Validating the REST API Responses
    1. Assertions on JSON Response Body and Headers Through Automated Code
    2. Parsing the JSON Response Body Using JSON Path Class
    3. Integrating Multiple APIs with the Common JSON Response Values
    4. Building End-to-End Automation Using GET, POST, and PUT HTTP Methods
    5. Importance of Junit/TestNG Assertions in Validating the Responses
  5. Chapter 5 : Diving in Depth Automating REST API
    1. Understanding the Structure of Complex Nested JSON and its Array Notations
    2. Retrieving the JSON Array Size and its Elements Using the JSON Path
    3. Iterating Over Every Element of the JSON Array and Accessing Elements in it
    4. Retrieving JSON Nodes on Condition Logic Using the JSON Path
    5. Real-Time Example to Solve Business Logic Using the JSON Response
  6. Chapter 6 : Handling Dynamic JSON Payloads with Parameterization
    1. Why Dynamic JSON Payloads are Important to Understand
    2. Introduction to Library API
    3. Testing REST Assured for Library API Using the Add Book HTTP Method
    4. Sending Parameters to Payload Through Test
    5. Understanding TestNG Data Provider for Parameterization
    6. Example on Parameterization of API Tests with Multiple Datasets
    7. How to Handle with Static JSON Payloads
  7. Chapter 7 : Real-World Example Automating Jira APIs
    1. How Jira API Works
    2. Cookie Authentication API for Jira Requests
    3. GET and POST APIs in Jira for Creating Bugs
    4. Defining Path Parameters in REST Assured Code Using Add Comment API
    5. Importance of the Session Filter Cookie in REST Assured Code
    6. Sending Attachments to REST API Using the MultiPart Method in REST Assured
    7. Integrating Query Params and Path Params in a Single Test to Restrict the Results
    8. Parsing a Complex Jira JSON Response to Retrieve the Added Comment with Code Logic
    9. Importance of Assertions and HTTP Validations on REST API
  8. Chapter 8 : Handling Google and Facebook OAuth 2.0 Authorization Grant Types
    1. Introduction to OAuth 2.0 and Different Grant Types
    2. Understanding the Grant Type Authorization Flow with Real-Time Example
    3. Flow Procedure in Achieving OAuth 2.0 Authentication Mechanism
    4. Practicing the OAuth 2.0 Project to Retrieve the Courses List
  9. Chapter 9 : REST Assured Automation for OAuth 2.0 Authorization Code
    1. Performing REST Assured Automation Testing for the OAuth Project
    2. Integrating Web UI Automation to Generate an Authorization Code
    3. Formatting a URL String to Retrieve Codes Using Java Methods
    4. How to Deal with the Client Credentials Grant Type for OAuth Flow
  10. Chapter 10 : Deserialization Using POJO Classes with REST Assured
    1. What is Serialization and Deserialization in REST Assured?
    2. Libraries Needed to Support Serialization in REST Assured
    3. Strategies in Parsing Complex Nested JSON using POJO Classes
    4. Creating POJO Classes for the Real-Time Nested Array in JSON
    5. End-to-End Automation Examples using POJO Deserialization
    6. Solving Complex Queries from JSON Using Simple POJO Methods -Part 1
    7. Solving Complex Queries from JSON Using Simple POJO Methods-Part 2
  11. Chapter 11 : Serialization of the Input Payload Using Google Maps API Example
    1. Google Maps Add Place JSON to Implement Serialization
    2. Building POJO Classes for Constructing JSON Payload to API
    3. End-to-End Testing with Serialization
  12. Chapter 12 : Understanding Request and Response Spec Builders in REST Assured
    1. Significance of Spec Builders in REST Assured
    2. Practical Example of Implementing Spec Builders and Optimizing Code
  13. Chapter 13 : Maven and Cucumber Basics
    1. Importance of Maven in Framework Development
    2. Installing and Configuring Maven
    3. Understanding Terminologies of Maven
    4. Creating a Maven Project and Importing into Eclipse
    5. Introduction to Cucumber
    6. What is Gherkin Syntax and How it Works
    7. Understanding the Scenarios Outline in Cucumber
    8. Feature Files and Importance of Step Definition in Cucumber
    9. Creating a Project Template in Cucumber
    10. Understanding Cucumber Dependencies
    11. Understanding the Terminologies of Automation
    12. Mapping Step Definition to a Feature File
    13. Using Tidy Gherkin Plugin to Generate Step Definitions
    14. Running the Tests with testRunner
    15. Importance of Regular Expressions in Feature Files
    16. Reusing Functions with Different Data
  14. Chapter 14 : Cucumber BDD API Framework Development from Scratch - 1
    1. Learning Plan
    2. Creating a Maven Project with Cucumber REST Assured Dependencies
    3. Building a Cucumber Feature File for REST Assured API Tests
    4. Building Test Runner and Step Definition Files to Test the Add Place API Feature
    5. Implementing Real Code in Step Definition Files with Reusable Components
    6. Running the Test in Cucumber Standards with Necessary Configuration Changes
    7. Building Utility Files and Implement a Logging Feature in the framework
    8. Implementing Mechanisms to Drive Global Property Values from the Properties File
    9. Data-Driven Testing Mechanism for API Tests using the Cucumber Example Feature
    10. Parameterizing API Test with Multiple Data Sets using Cucumber Framework Features
    11. What are Enum Classes? How the Framework can Utilize the Enum Concepts?
    12. Removing Hardcoded Resource Details with Enum Class Methods
    13. Building End-to-End Test Case with the Add and Delete Place in Framework Standards – Part 1
    14. Building End-to-End Test Case in Framework Standards – Part 2
    15. Creating Additional Scenarios in Framework to Reuse Existing Step Definitions
    16. Importance of Cucumber Hooks in Setting up Preconditions for API Tests
    17. Optimizing the Framework Tests with All Necessary Validations
    18. Running the Complete Framework Using Maven Commands
    19. Generating Excellent Cucumber HTML Reporting with Additional Plug-ins
  15. Chapter 15 : Cucumber BDD API Framework Development from Scratch - 2
    1. Introduction to Jenkins CI Tool
    2. Integrating the API Framework into Jenkins and Triggering with the New Job Setup
    3. Setting Up the Parameterized Jenkin Job for the API Framework with Multiple Tags
  16. Chapter 16 : Understanding the Git Version Control System
    1. Introduction to Git
    2. Importance of GitHub and its Uses
    3. Creating Git Config and Repositories
    4. How to Push Code to a Remote Repository
    5. Understanding Staging and Commit in Git
    6. Adding a Remote Repository and Pushing the Committed Code
    7. End-to-End Working Example on Git Commands – Part 1
    8. End-to-End Working Example on Git Commands – Part 2
    9. Importance of Branching in Git
    10. Resolving Merge Conflicts with Git
  17. Chapter 17 : Excel Integration with REST Assured Test
    1. Apache POI API and Downloading Instructions
    2. Strategy to Access Excel Data
    3. Getting Rows and Cells from an Excel Sheet
    4. Retrieving Data from Excel Based on a Condition
    5. Practice Exercise - Excel Driven Testing – Part 1
    6. Practice Exercise- Excel Driven Testing – Part 2
    7. Practice Exercise- Excel Driven Testing – Part 3
    8. Introduction to Library API
    9. Library API Postman and REST Assured Examples
    10. Converting HashMap into JSON
    11. Testing Excel Integration with REST Assured
  18. Chapter 18 : Java Basics
    1. Java Program Principles
    2. Classes and Objects in Java
    3. Strings in Java
    4. String Practice Exercises
    5. What is an interface?
    6. How Java Classes can Take Advantage of the Interface
    7. Using Inheritance in JAVA
    8. Practical Examples on Types of Inheritance
    9. Introduction to Arrays
    10. Single-Dimensional and Multidimensional Arrays Usage

Product information

  • Title: REST API Automation Testing from Scratch - REST Assured Java
  • Author(s): Rahul Shetty
  • Release date: January 2018
  • Publisher(s): Packt Publishing
  • ISBN: 9781789133813