├── LICENSE ├── README.md ├── Section 1 ├── 1.1.PNG ├── 1.2.PNG ├── 1.PNG ├── Notes download.docx ├── Notes download.txt └── Section 1.txt ├── Section 10 ├── 10.1.PNG ├── 10.PNG ├── Code.txt └── Section 10.txt ├── Section 11 ├── 11.1.PNG ├── 11.2.PNG ├── 11.PNG ├── Code.txt ├── Demo.zip ├── Section 11.txt └── note.txt ├── Section 12 ├── 12.1.PNG ├── 12.PNG ├── Code.txt └── Section 12.txt ├── Section 13 ├── 13.PNG ├── Code.txt ├── DemoSerializationSpecBuilder.zip └── Section 13.txt ├── Section 14 ├── 14.PNG └── Section 14.txt ├── Section 15 ├── 15.1.PNG ├── 15.2.PNG ├── 15.3.PNG ├── 15.4.PNG ├── 15.5.PNG ├── 15.6.PNG ├── 15.PNG ├── Check Point.txt └── Section 15.txt ├── Section 16 ├── 16.1.PNG ├── 16.2.PNG ├── 16.3.PNG ├── 16.4.PNG ├── 16.5.PNG ├── 16.6.PNG ├── 16.7.PNG ├── 16.PNG ├── ApiFramework.zip ├── Check Point.txt ├── Code.txt ├── Framework Code.txt ├── Note.txt └── Section 16.txt ├── Section 17 ├── 17.1.PNG ├── 17.PNG ├── Important Note.txt └── Section 17.txt ├── Section 18 ├── 18.1.PNG ├── 18.2.PNG ├── 18.3.PNG ├── 18.PNG ├── Code Download.txt ├── Code ExcelDriven.txt ├── ExcelDriven.zip ├── Important Note.txt ├── RestAssured.zip └── Section 18.txt ├── Section 19 ├── 19.1.PNG ├── 19.2.PNG ├── 19.3.PNG ├── 19.PNG └── Section 19.txt ├── Section 2 ├── 2.PNG ├── Must Watch.txt └── Section 2.txt ├── Section 20 ├── 20.PNG ├── Section 20.txt └── bonus.txt ├── Section 3 ├── 3.1.PNG ├── 3.2.PNG ├── 3.PNG ├── Code(1).txt ├── Code.docx ├── Code.txt ├── POSTMAN_API.zip ├── Section 3.txt └── original.zip ├── Section 4 ├── 4.1.PNG ├── 4.PNG └── Section 4.txt ├── Section 5 ├── 5.1.PNG ├── 5.2.PNG ├── 5.PNG ├── Code.docx ├── Code.txt ├── DemoProject.zip └── Section 5.txt ├── Section 6 ├── 6.1.PNG ├── 6.2.PNG ├── 6.PNG ├── Code.docx ├── Code.txt ├── DemoProject.zip ├── JSON Code.docx ├── JSON Code.txt └── Section 6.txt ├── Section 7 ├── 7.1.PNG ├── 7.2.PNG ├── 7.PNG ├── Code.docx ├── Code.txt ├── Code2.docx ├── Code2.txt ├── Section 7.txt └── addbookrestassured.mp4 ├── Section 8 ├── 8.1.PNG ├── 8.2.PNG ├── 8.3.PNG ├── 8.PNG ├── Code.txt ├── Important Note 2.txt ├── Important Note.txt ├── Note.txt └── Section 8.txt └── Section 9 ├── 9.1.PNG ├── 9.2.PNG ├── 9.PNG ├── Code.txt ├── Postman Project.zip └── Section 9.txt /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Packt 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | # REST API Automation testing from scratch-(REST Assured Java) [Video] 5 | This is the code repository for [REST API Automation testing from scratch-(REST Assured Java) [Video]](https://www.packtpub.com/big-data-and-business-intelligence/obtaining-winning-insights-your-business-data-video?utm_source=github&utm_medium=repository&utm_campaign=9781789954449), published by [Packt](https://www.packtpub.com/?utm_source=github). It contains all the supporting project files necessary to work through the video course from start to finish. 6 | ## About the Video Course 7 | REST Assured API is powerful API released by google (just like Selenium for Web) to Automate REST API's. 70% of the IT industry now heading towards this API for automating Services. Learn Everything You Need to Know about REST API Automation Even If You've never worked before on this domain. Course covers Basics to Advanced Level with Rest Assured, Postman, Java, TestNG, Framework Implementation from Scratch with rich examples like Jira, Twitter, YouTube, Google Maps API examples. Course is prepared on utmost care of picking real-world scenarios what actually industry does in testing the REST API's and they were neatly delivered with every basic concept till framework building level. On course completion you will be mastered in REST API Automation and can implement successfully it in your workplace. 8 | 9 |

What You Will Learn

10 |
11 |
20 | 21 | ## Instructions and Navigation 22 | ### Assumed Knowledge 23 | To fully benefit from the coverage included in this course, you will need:
24 | Manual testers, Non-programming aware testers interested in learning Automation, any Software engineer who are interested in Mobile Technologies and Freshers/Graduates/ Software Testers. 25 | ### Technical Requirements 26 | This course has the following software requirements:
27 | NA 28 | 29 | ## Related Products 30 | * [RESTful API Design with Node, Express, and MongoDB [Video]](https://www.packtpub.com/big-data-and-business-intelligence/obtaining-winning-insights-your-business-data-video?utm_source=github&utm_medium=repository&utm_campaign=9781789954449) 31 | 32 | * [RESTful Services with Delphi [Video]](https://www.packtpub.com/big-data-and-business-intelligence/obtaining-winning-insights-your-business-data-video?utm_source=github&utm_medium=repository&utm_campaign=9781789954449) 33 | 34 | * [Obtaining Winning Insights from your Business Data [Video]](https://www.packtpub.com/big-data-and-business-intelligence/obtaining-winning-insights-your-business-data-video?utm_source=github&utm_medium=repository&utm_campaign=9781789954449) 35 | 36 | -------------------------------------------------------------------------------- /Section 1/1.1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 1/1.1.PNG -------------------------------------------------------------------------------- /Section 1/1.2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 1/1.2.PNG -------------------------------------------------------------------------------- /Section 1/1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 1/1.PNG -------------------------------------------------------------------------------- /Section 1/Notes download.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 1/Notes download.docx -------------------------------------------------------------------------------- /Section 1/Notes download.txt: -------------------------------------------------------------------------------- 1 | Notes Download 2 | End point: Address where API is hosted on the Server. 3 | 4 | 5 | 6 | HTTP methods which are commonly used to communicate with Rest API’s are 7 | 8 | GET, POST, PUT, and DELETE 9 | 10 | GET- The GET method is used to extract information from the given server using a given URI. While using GET request, it should only extract data and should have no other effect on the data. No Payload/Body required 11 | 12 | How to send input data in GET? 13 | Ans: Using Query Parameters 14 | 15 | 16 | POST- A POST request is used to send data to the server, for example, customer information, file upload, etc. using HTML forms. 17 | 18 | How to send input data in POST? 19 | Ans: Using Form Parameters /Body Payload 20 | 21 | 22 | 23 | 24 | PUT- Replaces all current representations of the target resource with the uploaded content. 25 | 26 | DELETE- Removes all current representations of the target resource given by a URI. 27 | 28 | 29 | 30 | Resources: 31 | Resources represent API/Collection which can be accessed from the Server 32 | 33 | Google.com/maps 34 | google.com/search 35 | google.com/images 36 | 37 | 38 | Path Parameters: 39 | Path parameters are variable parts of a URL path. They are typically used to point to a specific resource within a collection, such as a user identified by ID 40 | 41 | https://www.google.com/Images/1123343 42 | https://www.google.com/docs/1123343 43 | https://amazon.com/orders/112 44 | 45 | https://www.google.com/search?q=newyork&oq=newyork&aqs=chrome..69i57j0l7.2501j0j7&sourceid=chrome&ie=UTF-8 46 | 47 | 48 | 49 | Query Parameters: 50 | Query Parameter is used to sort/filter the resources. 51 | 52 | Query Parameters are identified with?”” 53 | 54 | https://amazon.com/orders?sort_by=2/20/2020 55 | 56 | 57 | 58 | Headers/Cookies: 59 | 60 | Headers represent the meta-data associated with the API request and response. In layman terms, we were sending Additional details to API to process our request. 61 | Example : Authorization details 62 | 63 | 64 | 65 | 66 | 67 | End Point Request URL can be constructed as below 68 | Base URL/resource/(Query/Path)Parameters 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /Section 1/Section 1.txt: -------------------------------------------------------------------------------- 1 | REST API Basics and Terminology 2 | 3 | 4 | Course FAQ's/Syllabus (** Must Watch****) 5 | Introduction to REST API and where it is used in Project Architecture 6 | Real time Usage of API's in industry with Examples 7 | Understanding GET, POST, PUT DELETE Http Crud operations of API 8 | What are Path,Query Parameters & Headers in Rest API 9 | Notes Download 10 | -------------------------------------------------------------------------------- /Section 10/10.1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 10/10.1.PNG -------------------------------------------------------------------------------- /Section 10/10.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 10/10.PNG -------------------------------------------------------------------------------- /Section 10/Code.txt: -------------------------------------------------------------------------------- 1 | Code download 2 | ********************UPDATED CODE AS PER GOOGLE UPDATE ***************************** 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | package demo; 13 | 14 | import static io.restassured.RestAssured.given; 15 | 16 | 17 | 18 | import java.util.ArrayList; 19 | 20 | import java.util.Arrays; 21 | 22 | import java.util.List; 23 | 24 | 25 | 26 | import org.openqa.selenium.By; 27 | 28 | import org.openqa.selenium.Keys; 29 | 30 | import org.openqa.selenium.WebDriver; 31 | 32 | import org.openqa.selenium.chrome.ChromeDriver; 33 | 34 | 35 | 36 | import io.restassured.parsing.Parser; 37 | 38 | import io.restassured.path.json.JsonPath; 39 | 40 | import io.restassured.response.Response; 41 | 42 | import io.restassured.response.ResponseBody; 43 | 44 | import pojo.Api; 45 | 46 | import pojo.GetCourse; 47 | 48 | 49 | 50 | 51 | 52 | public class test1 { 53 | 54 | 55 | 56 | public static void main(String[] args) throws InterruptedException { 57 | 58 | // TODO Auto-generated method stub 59 | 60 | String url ="https://rahulshettyacademy.com/getCourse.php?state=verifyfjdss&code=4%2FvAHBQUZU6o4WJ719NrGBzSELBFVBI9XbxvOtYpmYpeV47bFVExkaxWaF_XR14PHtTZf7ILSEeamywJKwo_BYs9M&scope=email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+openid&authuser=0&session_state=0c32992f0d47e93d273922018ade42d1072b9d1f..a35c&prompt=none#"; 61 | 62 | 63 | 64 | String partialcode=url.split("code=")[1]; 65 | 66 | String code=partialcode.split("&scope")[0]; 67 | 68 | System.out.println(code); 69 | 70 | String response = 71 | 72 | given() 73 | 74 | .urlEncodingEnabled(false) 75 | 76 | .queryParams("code",code) 77 | 78 | 79 | 80 | .queryParams("client_id", "692183103107-p0m7ent2hk7suguv4vq22hjcfhcr43pj.apps.googleusercontent.com") 81 | 82 | .queryParams("client_secret", "erZOWM9g3UtwNRj340YYaK_W") 83 | 84 | .queryParams("grant_type", "authorization_code") 85 | 86 | .queryParams("state", "verifyfjdss") 87 | 88 | .queryParams("session_state", "ff4a89d1f7011eb34eef8cf02ce4353316d9744b..7eb8") 89 | 90 | // .queryParam("scope", "email+openid+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email") 91 | 92 | 93 | 94 | .queryParams("redirect_uri", "https://rahulshettyacademy.com/getCourse.php") 95 | 96 | .when().log().all() 97 | 98 | .post("https://www.googleapis.com/oauth2/v4/token").asString(); 99 | 100 | // System.out.println(response); 101 | 102 | JsonPath jsonPath = new JsonPath(response); 103 | 104 | String accessToken = jsonPath.getString("access_token"); 105 | 106 | System.out.println(accessToken); 107 | 108 | String r2= given().contentType("application/json"). 109 | 110 | queryParams("access_token", accessToken).expect().defaultParser(Parser.JSON) 111 | 112 | .when() 113 | 114 | .get("https://rahulshettyacademy.com/getCourse.php") 115 | 116 | .asString(); 117 | 118 | System.out.println(r2); 119 | 120 | 121 | 122 | } 123 | 124 | 125 | 126 | } 127 | 128 | 129 | 130 | -------------------------------------------------------------------------------- /Section 10/Section 10.txt: -------------------------------------------------------------------------------- 1 | Rest Assured Automation for OAuth 2.0 Authorization code 2 | 3 | 4 | Building up Rest Assured Automation Test for the OAuth Project 5 | Integration Web UI Automation to generate Authorization code 6 | Formatting URL String to retrieve code using java methods 7 | Code download 8 | How to deal with Client Credentials Grant type for OAuth flow 9 | -------------------------------------------------------------------------------- /Section 11/11.1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 11/11.1.PNG -------------------------------------------------------------------------------- /Section 11/11.2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 11/11.2.PNG -------------------------------------------------------------------------------- /Section 11/11.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 11/11.PNG -------------------------------------------------------------------------------- /Section 11/Code.txt: -------------------------------------------------------------------------------- 1 | Code download 2 | Please download complete project code from this lecture 3 | 4 | Resources for this lecture 5 | -------------------------------------------------------------------------------- /Section 11/Demo.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 11/Demo.zip -------------------------------------------------------------------------------- /Section 11/Section 11.txt: -------------------------------------------------------------------------------- 1 | Deserialization using POJO classes with Rest Assured 2 | 3 | 4 | What is Serialization and Deserialization in Rest Assured 5 | Libraries needed to support Serialization in Rest Assured 6 | Strategies in Parsing Complex nested Json using POJO classes 7 | Creating POJO classes for the real time Nested Array Json 8 | End to end Automation examples using POJO Deserialization 9 | Solving Complex Queries from Json with simple POJO methods -Part 1 10 | Solving Complex Queries from Json with simple POJO methods-Part 2 11 | How to showcase API Testing experience to recruiters? 12 | Code download 13 | 14 | -------------------------------------------------------------------------------- /Section 11/note.txt: -------------------------------------------------------------------------------- 1 | How to showcase API Testing experience to recruiters? 2 | API Test Automation sting is one of the ever green Automation requirement in Job Market and recruiters having tough time always to find the people who have real selenium skills 3 | 4 | 5 | 6 | WIth the Knowledge what you have gained from this course, It is just a cake walk to crack any API Testing Interview. 7 | 8 | 9 | 10 | So how can recruiter know that you have real Selenium knowledge is Biggest Question. 11 | 12 | 13 | 14 | ***********************************************************************************************There are Hundreds of QA Recruiters (especially from US, India) in my Linkedin Network. So Complete the course 100% and Udemy will honour you with Certificate of Completion on Cypress. Post the certificate in your Linkedin and Tag me. 15 | 16 | 17 | 18 | That's it!! All my network can view this post and if luck favors, You may get a call with Great Salary offer. 19 | 20 | 21 | 22 | You can find my linkedIn details on my Udemy profile page under Image icon 23 | 24 | 25 | 26 | All the Best :) 27 | 28 | -------------------------------------------------------------------------------- /Section 12/12.1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 12/12.1.PNG -------------------------------------------------------------------------------- /Section 12/12.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 12/12.PNG -------------------------------------------------------------------------------- /Section 12/Code.txt: -------------------------------------------------------------------------------- 1 | Where to download Code 2 | Code discussed in this complete section is available for download in the last lecture of the Next section 3 | -------------------------------------------------------------------------------- /Section 12/Section 12.txt: -------------------------------------------------------------------------------- 1 | Serialization of Input Payload using Google Maps API Example 2 | 3 | 4 | Google Maps Add Place Json to implement Serialization 5 | Build POJO classes for constructing Json Payload to API Rec 12-19-19 2 6 | Complete End to end Test case with Serialization Implementation Rec 12-19-19 34 7 | Where to download Code 8 | -------------------------------------------------------------------------------- /Section 13/13.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 13/13.PNG -------------------------------------------------------------------------------- /Section 13/Code.txt: -------------------------------------------------------------------------------- 1 | Code Download 2 | Please download the code from this lecture 3 | 4 | Resources for this lecture -------------------------------------------------------------------------------- /Section 13/DemoSerializationSpecBuilder.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 13/DemoSerializationSpecBuilder.zip -------------------------------------------------------------------------------- /Section 13/Section 13.txt: -------------------------------------------------------------------------------- 1 | Understand Request and Response Spec Builders in Rest Assured 2 | 3 | 4 | Significance of Spec Builders in Rest Assured Rec 12-19-19 5(builderDoc) 5 | Practical Example in implementing Spec Builders and optimize code Rec 12-19-19 6 | Code Download 7 | -------------------------------------------------------------------------------- /Section 14/14.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 14/14.PNG -------------------------------------------------------------------------------- /Section 14/Section 14.txt: -------------------------------------------------------------------------------- 1 | REST API Framework Learning Plan***Must WATCH **** 2 | 3 | 4 | 5 | Learning Plan 6 | 7 | 8 | -------------------------------------------------------------------------------- /Section 15/15.1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 15/15.1.PNG -------------------------------------------------------------------------------- /Section 15/15.2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 15/15.2.PNG -------------------------------------------------------------------------------- /Section 15/15.3.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 15/15.3.PNG -------------------------------------------------------------------------------- /Section 15/15.4.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 15/15.4.PNG -------------------------------------------------------------------------------- /Section 15/15.5.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 15/15.5.PNG -------------------------------------------------------------------------------- /Section 15/15.6.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 15/15.6.PNG -------------------------------------------------------------------------------- /Section 15/15.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 15/15.PNG -------------------------------------------------------------------------------- /Section 15/Check Point.txt: -------------------------------------------------------------------------------- 1 | CheckPoint 2 | That's All You need to know about Maven for now. 3 | 4 | From Next lecture, We shall focus on learning Cucumber Basics. 5 | 6 | Note : If you are already of Cucumber basics , You can safely skip this section and Move to next section 7 | -------------------------------------------------------------------------------- /Section 15/Section 15.txt: -------------------------------------------------------------------------------- 1 | Maven and Cucumber Basics (SKIP IF YOU ALREADY KNOW BASICS) 2 | 3 | 4 | Importance of Maven in Framework development 5 | Installing and configuring Maven 6 | Understanding Terminologies of Maven 7 | Creating Maven Project and importing into eclipse 8 | CheckPoint 9 | Introduction to Cucumber 10 | What is Gherkin syntax and how it works 11 | Understand the Cucumber Scenarios Usage 12 | Feature files and StepDefination Importance in Cucumber 13 | cucumber project creation template 14 | Understanding cucumber dependencies 15 | Understand the Terminologies of Automation 16 | Mapping step defination to feature file 17 | Tidygherkin plugin to generate step definations. 18 | Running the Tests with testRunner. 19 | importance of regular expressions in feature files 20 | How to reuse functions with different data 21 | -------------------------------------------------------------------------------- /Section 16/16.1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 16/16.1.PNG -------------------------------------------------------------------------------- /Section 16/16.2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 16/16.2.PNG -------------------------------------------------------------------------------- /Section 16/16.3.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 16/16.3.PNG -------------------------------------------------------------------------------- /Section 16/16.4.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 16/16.4.PNG -------------------------------------------------------------------------------- /Section 16/16.5.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 16/16.5.PNG -------------------------------------------------------------------------------- /Section 16/16.6.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 16/16.6.PNG -------------------------------------------------------------------------------- /Section 16/16.7.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 16/16.7.PNG -------------------------------------------------------------------------------- /Section 16/16.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 16/16.PNG -------------------------------------------------------------------------------- /Section 16/ApiFramework.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 16/ApiFramework.zip -------------------------------------------------------------------------------- /Section 16/Check Point.txt: -------------------------------------------------------------------------------- 1 | CheckPoint before starting Framework lectures 2 | Have you gone through Section 15 Master Plan lecture to see if you have covered learning all Prerequisite topics on Framework design. If not please check out and make sure you gone through all topics of this course before proceeding with Framework Design. 3 | 4 | Code for this complete Framework Section will be available in the last lecture of this section to download. 5 | 6 | 7 | -------------------------------------------------------------------------------- /Section 16/Code.txt: -------------------------------------------------------------------------------- 1 | rest api publish 2 | ask for review 3 | 4 | 5 | prepare material 6 | import org.testng.annotations.Test; 7 | 8 | import io.restassured.RestAssured; 9 | import io.restassured.path.json.JsonPath; 10 | import io.restassured.response.Response; 11 | 12 | import static io.restassured.RestAssured.given; 13 | 14 | 15 | //rahulonlinetutor@gmail.com 16 | //https://mvnrepository.com/artifact/com.github.scribejava/scribejava-core/2.5.3 17 | 18 | //https://mvnrepository.com/artifact/com.github.scribejava/scribejava-apis/2.5.3 19 | 20 | public class basics9 { 21 | 22 | String ConsumerKey="ztXsFr0ipQTIDue4MD20s4aL3"; 23 | String ConsumerSecret="kuOlC5wB1DZ8ahgOsEos1zLa7C4fLmlpSSB5QEJmFFEX70CT2n"; 24 | String Token="917476985835851778-vOmu4mScebK0zi7hTPXgprO9A7BMLsw"; 25 | String TokenSecret="tCw78M48rJC2mNWpNvZJuXhGUqFgQ8mqowdsjrDbwbQLs"; 26 | String id; 27 | @Test 28 | public void getLatestTweet() 29 | { 30 | 31 | RestAssured.baseURI="https://api.twitter.com/1.1/statuses"; 32 | Response res= given().auth().oauth(ConsumerKey, ConsumerSecret, Token, TokenSecret) 33 | .queryParam("count", "1") 34 | .when().get("/home_timeline.json").then().extract().response(); 35 | 36 | String response =res.asString(); 37 | System.out.println(response); 38 | JsonPath js= new JsonPath(response); 39 | 40 | System.out.println(js.get("text")); 41 | System.out.println(js.get("id")); 42 | 43 | 44 | } 45 | @Test 46 | public void createTweet() 47 | { 48 | 49 | RestAssured.baseURI="https://api.twitter.com/1.1/statuses"; 50 | Response res= given().auth().oauth(ConsumerKey, ConsumerSecret, Token, TokenSecret) 51 | .queryParam("status", "I am creating this tweet with Automation") 52 | .when().post("/update.json").then().extract().response(); 53 | 54 | String response =res.asString(); 55 | System.out.println(response); 56 | JsonPath js= new JsonPath(response); 57 | System.out.println("Below is the tweet added"); 58 | //System.out.println(js.get("text")); 59 | System.out.println(js.get("id")); 60 | id=js.get("id").toString(); 61 | 62 | 63 | } 64 | @Test 65 | public void E2E() 66 | { 67 | createTweet(); 68 | RestAssured.baseURI="https://api.twitter.com/1.1/statuses"; 69 | Response res= given().auth().oauth(ConsumerKey, ConsumerSecret, Token, TokenSecret) 70 | .when().post("/destroy/"+id+".json").then().extract().response(); 71 | 72 | String response =res.asString(); 73 | System.out.println(response); 74 | JsonPath js= new JsonPath(response); 75 | //System.out.println(js.get("text")); 76 | System.out.println("Tweet which got deleted with automation is below"); 77 | System.out.println(js.get("text")); 78 | System.out.println(js.get("truncated")); 79 | 80 | 81 | } 82 | 83 | 84 | } 85 | 86 | -------------------------------------------------------------------------------- /Section 16/Framework Code.txt: -------------------------------------------------------------------------------- 1 | Framework Code download 2 | Please download the code from this lecture 3 | 4 | Resources for this lecture -------------------------------------------------------------------------------- /Section 16/Note.txt: -------------------------------------------------------------------------------- 1 | code download 2 | Please download the code from resources tab 3 | 4 | Resources for this lecture 5 | -------------------------------------------------------------------------------- /Section 16/Section 16.txt: -------------------------------------------------------------------------------- 1 | Cucumber BDD API Framework Development from Scratch -1 2 | 3 | 4 | CheckPoint before starting Framework lectures 5 | Creating Maven project with Cucumber Rest Assured Dependencies 6 | Building Cucumber Feature file for Rest Assured API Tests 7 | Building Test Runner and Step Definition files for Add Place API Feature Test 8 | Implementing Real code in Step Definition files with reusable components 9 | Running the Test in Cucumber Standards with necessary Configuration changes 10 | Building Utility Files and Implement Logging feature in Framework 11 | Implement Mechanism to drive Global property values from Properties file 12 | Data Driven Testing Mechanism for API Tests using Cucumber example feature 13 | Parameterize API Test with multiple Data sets using Cucumber Framework features 14 | What are Enum classes? How Framework can utilize the Enum concepts 15 | Removing Hardcoded resource details with Enum class Methods 16 | Build End to End Testcase with Add and Delete Place in Framework Standards -1 17 | Build End to End Testcase in Framework Standards -2 18 | Creating Additional Scenarios in Framework to reuse existing Step Definitions -4 19 | Importance of Cucumber Hooks in setting up Preconditions for API Tests -5 20 | Optimizing the Framework Tests with all necessary validations -6 21 | Running the Complete Framework using Maven commands 23/1 22 | code download 23 | Generate Excellent Cucumber HTML reporting with additional Plugins -23/2 24 | Framework Code download 25 | 26 | 27 | -------------------------------------------------------------------------------- /Section 17/17.1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 17/17.1.PNG -------------------------------------------------------------------------------- /Section 17/17.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 17/17.PNG -------------------------------------------------------------------------------- /Section 17/Important Note.txt: -------------------------------------------------------------------------------- 1 | Important Note 2 | In the Next lecture, We shall see how to install Jenkins and Set up in our Machines which will be used in later lectures for Framework Integration. 3 | -------------------------------------------------------------------------------- /Section 17/Section 17.txt: -------------------------------------------------------------------------------- 1 | Cucumber BDD API Framework Development from Scratch - 2 2 | 3 | 4 | Important Note 5 | Introduction to Jenkins CI tool 6 | Integrating the API Framework into Jenkins and triggering with New job setup 24 7 | Setting up Parameterized Jenkin Job for API Framework with multiple Tags 24/1 8 | 9 | -------------------------------------------------------------------------------- /Section 18/18.1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 18/18.1.PNG -------------------------------------------------------------------------------- /Section 18/18.2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 18/18.2.PNG -------------------------------------------------------------------------------- /Section 18/18.3.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 18/18.3.PNG -------------------------------------------------------------------------------- /Section 18/18.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 18/18.PNG -------------------------------------------------------------------------------- /Section 18/Code Download.txt: -------------------------------------------------------------------------------- 1 | Code download 2 | Download code from resources tab 3 | 4 | Resources for this lecture -------------------------------------------------------------------------------- /Section 18/Code ExcelDriven.txt: -------------------------------------------------------------------------------- 1 | Code download 2 | Please download the code from resources tab 3 | 4 | Resources for this lecture 5 | -------------------------------------------------------------------------------- /Section 18/ExcelDriven.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 18/ExcelDriven.zip -------------------------------------------------------------------------------- /Section 18/Important Note.txt: -------------------------------------------------------------------------------- 1 | Please note 2 | In the next two lectures, I will be talking about Library API and the methods we have to work with this API. 3 | 4 | But These two videos are already discussed in lecture 30, 31. If you have already gone through those lectures, you can skip next 2 lectures i.e Lecture 95,96 and directly Jump into Lecture 97. 5 | 6 | If not please watch in the sequence to understand what is Library API and how we will use it for remaining lectures in this section. 7 | 8 | Thankyou! -------------------------------------------------------------------------------- /Section 18/RestAssured.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 18/RestAssured.zip -------------------------------------------------------------------------------- /Section 18/Section 18.txt: -------------------------------------------------------------------------------- 1 | Excel Integration with Rest Assured Test 2 | 3 | 4 | 5 | what is Apace POI API & Download Instructions 6 | Strategy to Access Excel Data 7 | Getting rows and its cells from Sheet 8 | Retrieving Data from Excel based on condition 9 | Practise Exercise- Excel Driven testing -1 10 | Practise Exercise- Excel Driven testing -2 11 | Practise Exercise- Excel Driven testing -3 12 | Code download 13 | Please note 14 | Introducion to Library API 15 | Library APi Postman and Rest Assured examples 16 | Conversion of HashMap into Json 17 | Excel Integration with Rest Assured Test 18 | Code download 19 | -------------------------------------------------------------------------------- /Section 19/19.1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 19/19.1.PNG -------------------------------------------------------------------------------- /Section 19/19.2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 19/19.2.PNG -------------------------------------------------------------------------------- /Section 19/19.3.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 19/19.3.PNG -------------------------------------------------------------------------------- /Section 19/19.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 19/19.PNG -------------------------------------------------------------------------------- /Section 19/Section 19.txt: -------------------------------------------------------------------------------- 1 | Core Java basics 2 | 3 | 4 | Java program principles 5 | Classes,objects in Java 6 | Strings in Java 7 | String Practise exercises 8 | What is Interface? 9 | How Java classes can take advantage of Interface? 10 | Usage of Inheritance in Java 11 | Understanding google place Search API for scripting 12 | Practical examples on types of inheritances 13 | Introduction to Arrays 14 | Single dimensional and Multidimensional arrays usage 15 | -------------------------------------------------------------------------------- /Section 2/2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 2/2.PNG -------------------------------------------------------------------------------- /Section 2/Must Watch.txt: -------------------------------------------------------------------------------- 1 | Must watch Lectures for basics brush up 2 | Hungry on Learning Java in Depth?? 3 | 4 | Here you GO.. 5 | 6 | Keeping Testers skill set in mind,- 7 | 8 | ********************* I have designed Top notch Java and TestNG Videos from scratch level which covers much more Core java OOPS concepts and necessary knowledge for API Framework building 9 | 10 | You can find them in the sections 18,19 of this course. 11 | 12 | But my personal advice is to Continue with the lectures in order to complete Rest API Automation learning first, and then learn java and Testng on your own pace :) 13 | 14 | -------------------------------------------------------------------------------- /Section 2/Section 2.txt: -------------------------------------------------------------------------------- 1 | 15 hours of Java, Testng and Maven Tutorials for Basics brushup 2 | 3 | 4 | Must watch Lectures for basics brush up 5 | -------------------------------------------------------------------------------- /Section 20/20.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 20/20.PNG -------------------------------------------------------------------------------- /Section 20/Section 20.txt: -------------------------------------------------------------------------------- 1 | BONUS- Student Special 2 | 3 | 4 | Bonus Lecture -Discount Coupons for other courses 5 | 6 | -------------------------------------------------------------------------------- /Section 20/bonus.txt: -------------------------------------------------------------------------------- 1 | Bonus Lecture -Discount Coupons for other courses 2 | Rahul Shetty Courses Discount Coupons 3 | 4 | 5 | 6 | For Every course below, I have shared two Discount coupon links. You can enroll from the link which ever gives the lowest price for you out of two 7 | 8 | ************************************************************************************* 9 | 10 | Robotic Process Automation(RPA) using UIPATH + Live Projects 11 | 12 | https://www.udemy.com/course/rpa-uipath/?couponCode=D4E966D67C85BDABBD95 13 | 14 | https://www.udemy.com/course/rpa-uipath/?referralCode=18539ACE13CA10B3F913 15 | 16 | 17 | 18 | Selenium Python Automation Testing from Scratch + Frameworks 19 | 20 | https://www.udemy.com/course/learn-selenium-automation-in-easy-python-language/?couponCode=EB6C9CCBB3402F695065 21 | 22 | https://www.udemy.com/course/learn-selenium-automation-in-easy-python-language/?referralCode=907494E3C21AF19DF472 23 | 24 | 25 | 26 | Appium – Mobile Automation from Scratch + Frameworks 27 | 28 | https://www.udemy.com/course/mobile-automation-using-appiumselenium-3/?couponCode=407F20DE81D12BC616E9 29 | 30 | https://www.udemy.com/course/mobile-automation-using-appiumselenium-3/?referralCode=C46BF551F5B9EAF08E10 31 | 32 | 33 | 34 | Learn Protractor(Angular Testing) from scratch +Framework 35 | 36 | https://www.udemy.com/course/protractor-tutorial/?referralCode=4BD09EB80BA2B9E8FFEA 37 | 38 | https://www.udemy.com/course/protractor-tutorial/?couponCode=D3CF9BDBC39902215691 39 | 40 | 41 | 42 | Cypress-Modern Automation Testing from Scratch + Framework 43 | 44 | https://www.udemy.com/course/cypress-tutorial/?couponCode=C477852972D1299F0BA5 45 | 46 | https://www.udemy.com/course/cypress-tutorial/?referralCode=32996BF536115C960678 47 | 48 | 49 | 50 | Master Software Testing+Jira+Agile on Live App-Be a TeamLead 51 | 52 | https://www.udemy.com/course/learn-software-testing-in-practical-become-a-qa-expert/?couponCode=713120E2D2F8B64C0212 53 | 54 | 55 | 56 | https://www.udemy.com/course/learn-software-testing-in-practical-become-a-qa-expert/?referralCode=B2901574D20A84F4F94F 57 | 58 | 59 | 60 | Learn JMETER from Scratch on Live Apps -Performance Testing 61 | 62 | 63 | 64 | https://www.udemy.com/course/learn-jmeter-from-scratch-performance-load-testing-tool/?couponCode=EE99240B6A3BD5EAE2C1 65 | 66 | 67 | https://www.udemy.com/course/learn-jmeter-from-scratch-performance-load-testing-tool/?referralCode=E29109A7BEC228EED509 68 | 69 | 70 | 71 | WebServices/Rest API Testing with SoapUI +Real time Projects 72 | 73 | https://www.udemy.com/course/webservices-testing-with-soap-ui/?couponCode=DFD1BADA4C127661ADF9 74 | 75 | 76 | 77 | https://www.udemy.com/course/webservices-testing-with-soap-ui/?referralCode=A6461A7438563696BB77 78 | 79 | 80 | 81 | SDET/Test Architect Essentials -Road to Full stack QA 82 | 83 | https://www.udemy.com/course/sdettraining-testarchitect-fullstackqa/?referralCode=E76A8BC1A22903C614BE 84 | 85 | https://www.udemy.com/course/sdettraining-testarchitect-fullstackqa/?couponCode=62D2C0CB4F658B5E49BB 86 | 87 | 88 | 89 | Cucumber with Java-Build Automation Framework in lesser code 90 | 91 | 92 | 93 | https://www.udemy.com/course/cucumber-tutorial/?couponCode=64AAD573D276CFF432D5 94 | 95 | https://www.udemy.com/course/cucumber-tutorial/?referralCode=452C30D3B2EF720F0072 96 | 97 | 98 | 99 | 100 | 101 | 102 | Selenium WebDriver with Java -Basics to Advanced+Frameworks 103 | 104 | 105 | 106 | https://www.udemy.com/course/selenium-real-time-examplesinterview-questions/?couponCode=F5C2643C29354C8F6B4C 107 | 108 | https://www.udemy.com/course/selenium-real-time-examplesinterview-questions/?referralCode=0D6919D2CF070539F2DA 109 | 110 | 111 | 112 | 113 | 114 | Learn SQL +Security(pen) testing from Scratch 115 | 116 | 117 | 118 | https://www.udemy.com/course/database-testing-tutorial/?couponCode=809A6A09344DF5087935 119 | 120 | https://www.udemy.com/course/database-testing-tutorial/?referralCode=23FB742C2BD00EC7A977 121 | 122 | 123 | 124 | Core java for Automation Testers + Interview Programs 125 | 126 | 127 | 128 | https://www.udemy.com/course/core-java-tutorials/?referralCode=DC96B2014338907EA1C2 129 | 130 | https://www.udemy.com/course/core-java-tutorials/?couponCode=338B6DABFD7E248FB81B 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | -------------------------------------------------------------------------------- /Section 3/3.1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 3/3.1.PNG -------------------------------------------------------------------------------- /Section 3/3.2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 3/3.2.PNG -------------------------------------------------------------------------------- /Section 3/3.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 3/3.PNG -------------------------------------------------------------------------------- /Section 3/Code(1).txt: -------------------------------------------------------------------------------- 1 | Google Maps POSTMAN Code Download 2 | You can download the files from this lecture 3 | -------------------------------------------------------------------------------- /Section 3/Code.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 3/Code.docx -------------------------------------------------------------------------------- /Section 3/Code.txt: -------------------------------------------------------------------------------- 1 | Google Maps POSTMAN Code Download 2 | You can download the files from this lecture 3 | -------------------------------------------------------------------------------- /Section 3/POSTMAN_API.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 3/POSTMAN_API.zip -------------------------------------------------------------------------------- /Section 3/Section 3.txt: -------------------------------------------------------------------------------- 1 | Getting started with REST API Testing 2 | 3 | 4 | Video Player Setting tips for Best Experience in viewing course 5 | Introduction to POSTMAN and Google Maps API's 6 | Understand Add Place API and execute it through Postman 7 | Understand Get & Delete Place API using GET,Delete HTTp Methods using Postman 8 | Update Place API using PUT http method using Postman 9 | Google Maps POSTMAN Code Download 10 | -------------------------------------------------------------------------------- /Section 3/original.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 3/original.zip -------------------------------------------------------------------------------- /Section 4/4.1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 4/4.1.PNG -------------------------------------------------------------------------------- /Section 4/4.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 4/4.PNG -------------------------------------------------------------------------------- /Section 4/Section 4.txt: -------------------------------------------------------------------------------- 1 | Rest Assured setup for API Automation 2 | 3 | 4 | Introduction on Test API's 5 | Setting up Test Project with RestAssured API's 6 | Build Rest API Automation Test to Add Place and validate Status codes 7 | -------------------------------------------------------------------------------- /Section 5/5.1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 5/5.1.PNG -------------------------------------------------------------------------------- /Section 5/5.2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 5/5.2.PNG -------------------------------------------------------------------------------- /Section 5/5.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 5/5.PNG -------------------------------------------------------------------------------- /Section 5/Code.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 5/Code.docx -------------------------------------------------------------------------------- /Section 5/Code.txt: -------------------------------------------------------------------------------- 1 | 2 | Code Download 3 | 4 | For your reference, Code discussed in this Section 5 is available to download from this lecture 5 | -------------------------------------------------------------------------------- /Section 5/DemoProject.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 5/DemoProject.zip -------------------------------------------------------------------------------- /Section 5/Section 5.txt: -------------------------------------------------------------------------------- 1 | Validating the Rest API Responses 2 | 3 | 4 | Code Download 5 | Assertions on Json Response Body and Headers through Automated code 6 | Parsing the Json Response body using JsonPath class 7 | Integrating the Multiple API's with common Json response values 8 | Building End to End Automation using GET, POST and PUT Http Methods 9 | Importance of Junit/TestNG Assertions in validating the responses 10 | -------------------------------------------------------------------------------- /Section 6/6.1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 6/6.1.PNG -------------------------------------------------------------------------------- /Section 6/6.2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 6/6.2.PNG -------------------------------------------------------------------------------- /Section 6/6.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 6/6.PNG -------------------------------------------------------------------------------- /Section 6/Code.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 6/Code.docx -------------------------------------------------------------------------------- /Section 6/Code.txt: -------------------------------------------------------------------------------- 1 | Code Download 2 | Please download the code discussed in this section from this lecture 3 | 4 | Resources for this lecture -------------------------------------------------------------------------------- /Section 6/DemoProject.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 6/DemoProject.zip -------------------------------------------------------------------------------- /Section 6/JSON Code.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 6/JSON Code.docx -------------------------------------------------------------------------------- /Section 6/JSON Code.txt: -------------------------------------------------------------------------------- 1 | Json used in this Section with Queries to solve 2 | { 3 | 4 | "dashboard": { 5 | 6 | "purchaseAmount": 910, 7 | 8 | "website": "rahulshettyacademy.com" 9 | 10 | }, 11 | 12 | "courses": [ 13 | 14 | { 15 | 16 | "title": "Selenium Python", 17 | 18 | "price": 50, 19 | 20 | "copies": 6 21 | 22 | }, 23 | 24 | { 25 | 26 | "title": "Cypress", 27 | 28 | "price": 40, 29 | 30 | "copies": 4 31 | 32 | }, 33 | 34 | { 35 | 36 | "title": "RPA", 37 | 38 | "price": 45, 39 | 40 | "copies": 10 41 | 42 | } 43 | 44 | ] 45 | 46 | } 47 | 48 | 49 | 50 | 1. Print No of courses returned by API 51 | 52 | 2.Print Purchase Amount 53 | 54 | 3. Print Title of the first course 55 | 56 | 4. Print All course titles and their respective Prices 57 | 58 | 5. Print no of copies sold by RPA Course 59 | 60 | 6. Verify if Sum of all Course prices matches with Purchase Amount 61 | 62 | -------------------------------------------------------------------------------- /Section 6/Section 6.txt: -------------------------------------------------------------------------------- 1 | Diving in Depth-Automating REST API's 2 | 3 | 4 | Understanding Structure of Complex Nested Json and its array notations 5 | Json used in this Section with Queries to solve 6 | Retrieving the Json Array Size and its elements using JsonPath 7 | Iterating over every element of Json Array and accessing elements in it 8 | Retrieving Json Nodes on Condition logic using JsonPath 9 | Real Time example to solve Business logic through Json response 10 | Code Download 11 | -------------------------------------------------------------------------------- /Section 7/7.1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 7/7.1.PNG -------------------------------------------------------------------------------- /Section 7/7.2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 7/7.2.PNG -------------------------------------------------------------------------------- /Section 7/7.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 7/7.PNG -------------------------------------------------------------------------------- /Section 7/Code.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 7/Code.docx -------------------------------------------------------------------------------- /Section 7/Code.txt: -------------------------------------------------------------------------------- 1 | code download 2 | 3 | 4 | 5 | 6 | import org.testng.annotations.DataProvider; 7 | 8 | import org.testng.annotations.Test; 9 | 10 | import static io.restassured.RestAssured.given; 11 | 12 | 13 | 14 | import java.io.IOException; 15 | 16 | import java.nio.file.Files; 17 | 18 | import java.nio.file.Paths; 19 | 20 | 21 | 22 | import io.restassured.RestAssured; 23 | 24 | 25 | 26 | import io.restassured.path.json.JsonPath; 27 | 28 | 29 | 30 | import io.restassured.response.Response; 31 | 32 | 33 | 34 | import files.ReusableMethods; 35 | 36 | import files.payLoad; 37 | 38 | 39 | 40 | 41 | 42 | public class DynamicJson { 43 | 44 | 45 | 46 | @Test(dataProvider="BooksData") 47 | 48 | public void addBook(String isbn,String aisle) 49 | 50 | 51 | 52 | { 53 | 54 | 55 | 56 | RestAssured.baseURI="http://216.10.245.166"; 57 | 58 | Response resp=given(). 59 | 60 | header("Content-Type","application/json"). 61 | 62 | body(payLoad.Addbook(isbn,aisle)). 63 | 64 | when(). 65 | 66 | post("/Library/Addbook.php"). 67 | 68 | then().assertThat().statusCode(200). 69 | 70 | extract().response(); 71 | 72 | JsonPath js= ReusableMethods.rawToJson(resp); 73 | 74 | String id=js.get("ID"); 75 | 76 | System.out.println(id); 77 | 78 | 79 | 80 | //deleteBOok 81 | 82 | } 83 | 84 | @DataProvider(name="BooksData") 85 | 86 | public Object[][] getData() 87 | 88 | { 89 | 90 | //array=collection of elements 91 | 92 | //multidimensional array= collection of arrays 93 | 94 | return new Object[][] {‌{"ojfwty","9363"},{"cwetee","4253"}, {"okmfet","533"} }; 95 | 96 | } 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | } 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | -------------------------------------------------------------------------------- /Section 7/Code2.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 7/Code2.docx -------------------------------------------------------------------------------- /Section 7/Code2.txt: -------------------------------------------------------------------------------- 1 | code download 2 | import static io.restassured.RestAssured.given; 3 | 4 | 5 | 6 | import java.io.IOException; 7 | 8 | import java.nio.file.Files; 9 | 10 | import java.nio.file.Paths; 11 | 12 | 13 | 14 | import org.testng.annotations.Test; 15 | 16 | 17 | 18 | import files.ReusableMethods; 19 | 20 | import files.payLoad; 21 | 22 | import io.restassured.RestAssured; 23 | 24 | import io.restassured.path.json.JsonPath; 25 | 26 | import io.restassured.response.Response; 27 | 28 | 29 | 30 | public class StaticJson { 31 | 32 | @Test 33 | 34 | public void addBook() throws IOException 35 | 36 | 37 | 38 | { 39 | 40 | 41 | 42 | RestAssured.baseURI="http://216.10.245.166"; 43 | 44 | Response resp=given(). 45 | 46 | header("Content-Type","application/json"). 47 | 48 | body(GenerateStringFromResource("C:\\Users\\rahul\\Documents\\Addbookdetails.json")). 49 | 50 | when(). 51 | 52 | post("/Library/Addbook.php"). 53 | 54 | then().assertThat().statusCode(200). 55 | 56 | extract().response(); 57 | 58 | JsonPath js= ReusableMethods.rawToJson(resp); 59 | 60 | String id=js.get("ID"); 61 | 62 | System.out.println(id); 63 | 64 | 65 | 66 | //deleteBOok 67 | 68 | } 69 | 70 | public static String GenerateStringFromResource(String path) throws IOException { 71 | 72 | 73 | 74 | return new String(Files.readAllBytes(Paths.get(path))); 75 | 76 | 77 | 78 | } 79 | 80 | } 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /Section 7/Section 7.txt: -------------------------------------------------------------------------------- 1 | Handling Dynamic Json Payloads with Parameterization 2 | 3 | 4 | Why Dynamic Json payloads are important to understand 5 | Introduction to Library API 6 | Rest Assured Test for Library API Add Book http method 7 | Sending parameters to payload from Test 8 | Understanding TestNg Data provider for parameterization 9 | Example on Parameterization of API Tests with multiple data sets 10 | code download 11 | How to handle with static json payloads 12 | code download -------------------------------------------------------------------------------- /Section 7/addbookrestassured.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 7/addbookrestassured.mp4 -------------------------------------------------------------------------------- /Section 8/8.1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 8/8.1.PNG -------------------------------------------------------------------------------- /Section 8/8.2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 8/8.2.PNG -------------------------------------------------------------------------------- /Section 8/8.3.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 8/8.3.PNG -------------------------------------------------------------------------------- /Section 8/8.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 8/8.PNG -------------------------------------------------------------------------------- /Section 8/Code.txt: -------------------------------------------------------------------------------- 1 | Code Download 2 | package files; 3 | 4 | import static io.restassured.RestAssured.*; 5 | 6 | 7 | 8 | import java.io.File; 9 | 10 | 11 | 12 | import org.testng.Assert; 13 | 14 | 15 | 16 | import io.restassured.RestAssured; 17 | 18 | import io.restassured.filter.session.SessionFilter; 19 | 20 | import io.restassured.path.json.JsonPath; 21 | 22 | 23 | 24 | public class JiraTest { 25 | 26 | 27 | 28 | public static void main(String[] args) { 29 | 30 | // TODO Auto-generated method stub 31 | 32 | RestAssured.baseURI="http://localhost:8080"; 33 | 34 | //Login Scenario 35 | 36 | SessionFilter session=new SessionFilter(); 37 | 38 | String response=given().relaxedHTTPSValidation().header("Content-Type","application/json").body("{\r\n" + 39 | 40 | " \"username\": \"RahulShetty\",\r\n" + 41 | 42 | " \"password\": \"XXXX11\"\r\n" + 43 | 44 | "}").log().all().filter(session).when().post("/rest/auth/1/session").then().log().all().extract().response().asString(); 45 | 46 | String expectedMessage ="Hi How are you?"; 47 | 48 | //Add comment 49 | 50 | String addCommentResponse = given().pathParam("key", "10101").log().all().header("Content-Type","application/json").body("{\r\n" + 51 | 52 | " \"body\": \""+expectedMessage+"\",\r\n" + 53 | 54 | " \"visibility\": {\r\n" + 55 | 56 | " \"type\": \"role\",\r\n" + 57 | 58 | " \"value\": \"Administrators\"\r\n" + 59 | 60 | " }\r\n" + 61 | 62 | "}").filter(session).when().post("/rest/api/2/issue/{key}/comment").then().log().all() 63 | 64 | .assertThat().statusCode(201).extract().response().asString(); 65 | 66 | JsonPath js=new JsonPath(addCommentResponse); 67 | 68 | String commentId= js.getString("id"); 69 | 70 | //Add Attachment 71 | 72 | given().header("X-Atlassian-Token","no-check").filter(session).pathParam("key", "10101") 73 | 74 | .header("Content-Type","multipart/form-data") 75 | 76 | .multiPart("file",new File("jira.txt")).when(). 77 | 78 | post("rest/api/2/issue/{key}/attachments").then().log().all().assertThat().statusCode(200); 79 | 80 | //Get Issue 81 | 82 | String issueDetails=given().filter(session).pathParam("key", "10101") 83 | 84 | .queryParam("fields", "comment") 85 | 86 | .log().all().when().get("/rest/api/2/issue/{key}").then() 87 | 88 | .log().all().extract().response().asString(); 89 | 90 | System.out.println(issueDetails); 91 | 92 | JsonPath js1 =new JsonPath(issueDetails); 93 | 94 | int commentsCount=js1.getInt("fields.comment.comments.size()"); 95 | 96 | for(int i=0;i System > Attachments (under Advanced): Set Allow Attachments to ON 5 | 6 | -------------------------------------------------------------------------------- /Section 8/Important Note.txt: -------------------------------------------------------------------------------- 1 | Important Noe 2 | In the Next lecture, I will show cookie based Authentication for Jira Server API. 3 | 4 | Use below official Jira link for reference to know more about this topic 5 | 6 | https://developer.atlassian.com/server/jira/platform/cookie-based-authentication/ 7 | 8 | 9 | 10 | https://docs.atlassian.com/software/jira/docs/api/REST/7.6.1/ 11 | 12 | -------------------------------------------------------------------------------- /Section 8/Note.txt: -------------------------------------------------------------------------------- 1 | Please note 2 | If you have seen only audio with no video for any lecture, change your pixel settings to 720 and it works :) -------------------------------------------------------------------------------- /Section 8/Section 8.txt: -------------------------------------------------------------------------------- 1 | Real world Example-Automating Jira API's 2 | 3 | 4 | Please note 5 | How Jira API Works? 6 | Important Note 7 | Cookie Authentication API for Jira requests 8 | Jira GET,POST API Scripting for creating bugs 9 | Defining Path Parameters in Rest Assured code using Add Comment API 10 | Importance of Session Filter cookie in Rest Assured Code 11 | Important Note 12 | Sending Attachments to Rest API using MultiPart method in Rest Assured 13 | Integrating Query Params and Path Params in single test to restrict results 14 | Parsing Complex Jira Json response to retrieve the added Comment with code logic 15 | Importance of Assertions and Https Validations on Rest API's 16 | Code Download 17 | -------------------------------------------------------------------------------- /Section 9/9.1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 9/9.1.PNG -------------------------------------------------------------------------------- /Section 9/9.2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 9/9.2.PNG -------------------------------------------------------------------------------- /Section 9/9.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 9/9.PNG -------------------------------------------------------------------------------- /Section 9/Code.txt: -------------------------------------------------------------------------------- 1 | Postman Projects Download 2 | Please download the projects from this lecture 3 | 4 | Resources for this lecture -------------------------------------------------------------------------------- /Section 9/Postman Project.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-API-Automation-testing-from-scratch--REST-Assured-java/3cbb3b0bf3186b4fbe038915472598538e4c7329/Section 9/Postman Project.zip -------------------------------------------------------------------------------- /Section 9/Section 9.txt: -------------------------------------------------------------------------------- 1 | Handling Google/Facebook oauth 2.0 Authorization Grant types 2 | 3 | 4 | Introduction to OAuth 2.0 and different Grant types 5 | Understand Grant Type Authorization flow with real time example 6 | Flow procedure in achieving OAuth 2.0 Authentication mechanism 7 | Details on Practise OAuth 2.0 project to retrieve Courses list 8 | Postman Projects Download 9 | Shortcut to generate Access token through Postman OAuth 2.0 Authentication 10 | --------------------------------------------------------------------------------