
learn how an api enables two or more systems to exchange data over http or https using formats like json or xml, and how this differs from a gui.
Download Postman and install the app, then test API endpoints using the GET method, explore headers and body, and review JSON responses and authentication options.
Explore http methods, including get, post, put, patch, delete, options, and head, and how they retrieve, create, modify, patch, or delete data within rest APIs, highlighting rest flexibility vs soap.
Master the five HTTP status code categories: informational, success, redirection, client errors, and server errors—and learn common codes like 200, 201, 301, 400, 401, and 500 for REST API automation.
Compare rest and soap: rest stands for representational state transfer and exposes resources via base urls like /comments/2, while soap uses a protocol to fetch id 2.
Explore Rest Assured, a Java library with a DSL for automating REST API tests. Add the library to Eclipse and build maintainable REST API tests, noting SOAP testing as possible.
Master JSON concepts and jsonpath basics to navigate and extract data from JSON. Use jsonpathfinder.com to build and test REST API automation queries using path expressions, arrays, and objects.
Explore json schema as the blueprint for json data, defining property types and descriptions, and learn to validate service responses against the schema in automation.
Set up a Maven project in Eclipse and add Rest Assured dependencies, including io.rest-assured, json-path, xml-path, and TestNG, while updating JUnit to 4.12, and Maven downloads jars.
Learn to automate a simple get request with rest assured against the restcountries API, validating a 200 status code using a given, when, then flow in TestNG.
Validate json response for a rest api by asserting status code and body details, including country name, codes, currencies, and languages, using Rest Assured and Hamcrest matchers.
Validate xml responses with Rest Assured by adding query parameters, asserting a 200 status, and verifying city London and country GB in the xml body.
Learn how to extract the full API response with Rest Assured, store it in a response object, and use headers, body, and data for further processing or subsequent calls.
Learn to extract a single value from API responses using Rest Assured, using extract.path for JSON and XML, and store it in a variable for validation and logging.
Verify the HTTP status line of API responses using Rest Assured, including HTTP/1.1 and HTTP/2.0 formats, various status codes like 401 unauthorized, and how to assert the exact status line.
Learn to perform post requests in Rest Assured by sending JSON payloads from a file, validating response status and the created employee id.
Add the json dependency in pom.xml, create a json object with name, salary, and age, convert it to a string, and post with json content type.
Understand how put updates differ from post by updating an existing employee's details with a JSON payload and an update endpoint, validating with status 200.
Demonstrates the delete operation in rest api automation by sending a delete request with an employee id, validating a 200 status and 'successfully deleted records' message, and extracting the message.
Learn to log the complete rest assured responses with log.all, capturing status lines, headers, cookies, and body for debugging API tests.
Master selective response logging in REST API tests by using log body and log headers to focus on the body or headers, aiding quick triage and investigation.
Log cookies and log the status to see cookies and the response status in the console, and note that log.all and log.everything are the same.
Learn how log if error in Rest Assured triggers logging only on 4xx and 5xx responses, and how to log status, headers, cookies, and body for error triage.
Learn how log if validation fails differs from log if error, and how to log responses only when validations fail, using TestNG validations, status codes, and test order considerations.
Discover how to use query parameters with Rest Assured, handle single and multiple parameters, and log responses while validating status codes.
Explore how to pass multiple query parameters in Rest Assured using fixer.io API, and compare single parameter and hash map approaches for currency conversion rates.
Learn to pass multiple values for a single parameter using a codes query parameter, with alpha codes in the rest countries API, and observe semicolon or comma as delimiters.
Learn to automate an API with path parameters using Rest Assured, passing currency in the URL (USD) and validating a 200 status.
Learn to post form parameters with rest assured using url-encoded or multipart data, setting content type and encoding, and submitting fields via a hash map for a 200 status.
Explore how headers function as metadata in API requests and responses, including common examples like content-type, content-length, cookies, and authentication, and learn to verify headers in automation.
Learn to send request headers in a Rest Assured rest api call, including if none-match and if modified since, and log responses and verify a 200 status.
Create a header object to send multiple headers with Rest Assured, maintaining common headers in a hash map at class level, and send them via the object to API requests.
Learn to send cookies in Rest Assured by adding cookie name and value to the given, including multi value cookies, and see how cookies influence the request.
Learn to send cookies using a cookie builder in rest assured by creating a cookie object and configuring name, value, domain, path, expiry, and secure.
Validate response headers in Rest Assured by asserting the server header equals cloud flare, logging all responses, and ensuring a 200 status, with options to extract headers for later use.
Extract all response headers from an API call, store them in a headers object, and use header names with get value to retrieve specific values for validation or reuse.
Learn to extract all response cookies, store them in a string-to-string map, retrieve values by name, and reuse them for validation or in subsequent API requests, like header extraction.
Explore basic and digest authentication using username and password; basic encodes with base 64 encoding, digest uses hash encryption, and learn about preemptive and challenged authentication with rest assured.
Update the pom.xml by adding the ScribeJava API dependency (groupId com.github.scribejava, artifactId scibejava.apis, version 2.5.2) and upgrade Rest Assured to 3.1.0, then refresh the Maven project.
Understand OAuth 1.0, its keys and tokens: API key, API secret key, access token, and access token secret, and how to set up a Twitter developer app to post tweets.
learn how to post a tweet with rest assured using twitter oauth1.0, including api key, api secret, access token, and base uri, then validate the response.
Learn how OAuth 2.0 uses a client credentials grant to obtain a fresh access token and then calls PayPal APIs in a sandbox environment using Rest Assured.
learn how to validate json responses against a json schema using rest assured, including adding the json schema validator dependency and creating a schema file to validate the response.
Learn how to validate XML with a DTD schema using Rest Assured, by capturing the response body from a weather API and matching it against a DTD file.
Validate an XML response against an XSD schema by loading the XSD from resources and matching the response body to the schema in REST API automation with Rest Assured.
Explore service virtualization and API mocking with WireMock to simulate real APIs for testing when the service is unavailable, enabling automation against mock and third-party endpoints.
Download and run the WireMock standalone jar to start a local mock server on localhost:8080. Learn to create mappings and test via Postman, and explore changing ports and HTTPS setup.
Learn how to change wiremock http and https ports from 8080 via --port and https port 2424, while wiremock creates mappings and files folders and can disable ssl certificate verification.
Create json stubs for wiremock by adding a get request and response in mappings, place the stub there, run the server on localhost:8080, and verify a 200 response.
Create WireMock stub mappings with file bodies, using a files folder to send or receive XML, JSON, or text, and respond with file-based content.
Use the WireMock recorder to generate stub mappings from a live or unavailable API, save JSON mappings in the mappings folder, then replay with WireMock to mock the service.
Learn to specify a request port in Rest Assured, override the default port 8080 (e.g., 9999) using a base uri and a WireMock stub, and validate a 200 status.
Validate the api response time for an endpoint within a specified threshold using Rest Assured and a Hamcrest matcher, measured in milliseconds.
Learn to validate xml namespaces in api responses and parse xml with namespaces using Rest Assured by configuring an xml config with a namespace prefix and uri.
Validate a response by extracting fields from the response using Rest Assured's response object. Compare href, article id, and article url to ensure article url equals href plus article id.
Explore how to validate response data with a response aware matcher using a lambda, comparing href and article id to the article url in a Rest Assured test.
Learn to configure default values in Rest Assured tests using TestNG before class, setting base uri and port once to reduce repetition across WireMock endpoints.
This course covers REST API Automation using Rest Assured in detail from basic to advanced levels. I believe in example-oriented teaching. So, you won’t find any PPTs during the sessions. But, you will find dozens of real time scenarios used to elaborate various API Automation concepts.
Feel free to post your questions/feedback in the block provided under each session-video. I will make sure all of your queries are addressed. ‘Course Outline’ below will give you an idea about the depth and the overall coverage of this course. If you want to learn any other REST Assured concept - which is not already covered in this course - then feel free to let me know via Udemy messenger.
Course Outline:
Basic concepts of APIs
What is an API?
Postman Basics
API Methods
HTTP Status Codes
REST Vs SOAP
What is Rest Assured?
JSON and JSON Path
JSON Schema
Getting Started with Rest Assured
Rest Assured Setup Using Maven
Simple Get Request
Validate JSON Response
Validate XML Response
Extracting Response Data
Extracting Single Value From Response
Verifying Status Line
POST, PUT and DELETE
POST Using File
POST Using JSON Object
PUT Operation
DELETE Operation
Rest Assured Logging
Log All
Log Body and Headers
Log Cookies and Status
Log If Error
Log If Validation Fails
Handling Request Parameters
Query Parameters
Multiple Query Parameters
Multi-value Parameters
Path Parameters
Form Parameters
Working with Headers And Cookies
What Are Headers?
Sending Request Headers
Sending Headers Using Objects
Sending Cookies
Sending Cookies Using Builder
Validating Response Headers
Extracting Response Headers
Extracting Response Cookies
Authentication
Basic and Digest Auth
oAuth 1.0
Twitter oAuth Example
oAuth 2.0
XML And JSON Schema Validation
JSON Schema Validation
XML DTD Schema Validation
XML XSD Schema Validation
WireMock: Creating Mock WebService using WireMock
WireMock Setup
Writing WireMock Stubs
Creating Stub Mapping using File Body
Recording Stub Mappings using WireMock Recorder
Miscellaneous Operations
Specifying Request Port
Default Configuration Setup in RestAssured
Validating Response Time
XML Namespace Validation
Response Aware Matcher
Course Outline Ends
This course is designed for you if you are:
a QE Automation Engineer OR
a Selenium WebDriver automation aspirant OR
a manual testing professional willing to jump start your automation carrier OR
a QTP/UFT professional wanting to switch to API automation as per testing market demand OR
a QE Manager exploring better automation solutions for your project OR
a fresh grad looking to learn a quick new skill which has high demand in the job market OR
aspiring to learn coding and automation
To get the maximum benefit from the course, please take a look at following steps explaining 'How to take this course?'
Step 1: Schedule 30-45 minutes of your time daily for 5 days a week. 'Continuity' is the key.
Step 2: All sessions are divided in small videos of less than 20 minutes. Watch 2-3 videos daily.
Step 3: Hands-on exercise is very important. So, immediately try out the programs discussed in the session. Try them on your own. You can download these programs from lecture resources.
Step 4: Assignments with answer keys are provided where-ever necessary. Complete the assignments before jumping on to the next sessions.
Step 5: If you come across any questions or issues, please feel free to contact me and I will make sure that your queries are resolved.
Wish you all a very happy learning.
Note: All the course videos are in QHD. For the best video streaming quality, please adjust the resolution from 'settings' at bottom right-hand corner of video player. Choose 1080p or 720p as per your network speed.