SlideShare a Scribd company logo
1 of 11
#ATAGTR2017
16th 17th March
TEST THE REST
Varun Deshpande
Agile Testing Alliance Global Testing Retreat 2017
What is the REST
• REST (REpresentational State Transfer) is an architectural style, and an
approach to communications that is often used in the development of
Web Services
• REST uses HTTP protocols to communicate between producer and
consumers.
• HTTP Methods:- GET, POST, PUT, DELETE
• Working with URL’s
Agile Testing Alliance Global Testing Retreat 2017
Example of GET Request
Agile Testing Alliance Global Testing Retreat 2017
Why API Automation Required?
1.Early Defect Detection:-
Most of the time UI layer users the REST Web services to fetch the data from back
end and do the business validation. If their are any issue with the REST services, It
will be found before the developers actually consumer that web services. It will
saves the development time over the defected web services.
2.Contract Validation:-
In distributed environment different scrum teams are involved in development the
single functionality. In this case suppose a scrum team changes the some parameters
related to a web service which was consume by your team in last spring and they
failed to notify your team. This situation leads to a production detect of that
functionality which you have not touched in the current sprint. so validating contact
is necessary thing.
3.Stops the further build:-
If a test failed in Jenkins automation environment, It stops the further build unless
that error is rectified. Which assured that only good build pass to manual testers for
testing.
Agile Testing Alliance Global Testing Retreat 2017
Why API Automation Required?
4.Fast Result:-
API Automation test jobs took very less time to
complete the one testing cycle. this help in
automating the regression suit for an application.
This will very helpful in CICD (Continuous Integration,
Continuous Deployment) environments.
5.Reliable :-
If these test are passed without any issue then we
can sure that business layer is not having any defect.
6.Test Pyramid:-
API Automation involves significant role in building
the test pyramid. As the after the unit test cases it
comes with majority of numbers. Which helps
overall automation framework
Agile Testing Alliance Global Testing Retreat 2017
What is a REST Assured:-
• Testing and validating REST services in Java is harder than in dynamic
languages such as Ruby and Groovy. REST Assured brings the simplicity
of using these languages into the Java domain.
• REST Assured is a simple Java library for testing of REST services.
• Integrates seamlessly with existing Java based testing frameworks
– Junit, TestNG
– Selenium Webdriver
• Rest Assured features
– Supports for HTTP methods
– Supports for BDD/Gherkin(Given, When, Then)
– Use of Hamcrest matches for checks (equalTo)
– Use of Gpath for selecting element from JSON response.
Agile Testing Alliance Global Testing Retreat 2017
What is a REST Assured Gives:-
• It gives various methods to
1. format the HTTP request
2. send it over a network
3. validating HTTP status code of an request
4. Finally validating response data.
• It also handles the various authentication mechanism for the REST Requests
1. Basic Authentication(with username and password)
2. OAuth
3. OAuth 2.0
4. Certificates
5. Digest
6. Form based authentication
Agile Testing Alliance Global Testing Retreat 2017
Getting Started with REST Assured:-
Maven Dependency of REST Assured
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<version>3.0.1</version>
<scope>test</scope>
</dependency>
Agile Testing Alliance Global Testing Retreat 2017
Writing theTest
Agile Testing Alliance Global Testing Retreat 2017
Getting Started with REST Assured:-
For HTTP GET Request
response = given()
.contentType("application/json“)
.auth()
.basic(authData.getUserName(),authData.getPassword())
.when()
.get(url);
#ATAGTR2017
16th 17th March
Thank You
Varun Deshpande

More Related Content

What's hot

Matt carroll - "Security patching system packages is fun" said no-one ever
Matt carroll - "Security patching system packages is fun" said no-one everMatt carroll - "Security patching system packages is fun" said no-one ever
Matt carroll - "Security patching system packages is fun" said no-one ever
DevSecCon
 

What's hot (20)

ATAGTR2017 Testing of Connected Cars Based on IOT
ATAGTR2017 Testing of Connected Cars Based on IOTATAGTR2017 Testing of Connected Cars Based on IOT
ATAGTR2017 Testing of Connected Cars Based on IOT
 
ATAGTR2017 Cost-effective Security Testing Approaches for Web, Mobile & Enter...
ATAGTR2017 Cost-effective Security Testing Approaches for Web, Mobile & Enter...ATAGTR2017 Cost-effective Security Testing Approaches for Web, Mobile & Enter...
ATAGTR2017 Cost-effective Security Testing Approaches for Web, Mobile & Enter...
 
ATAGTR2017 Artificial Intelligence in Software Testing – Demystified
ATAGTR2017 Artificial Intelligence in Software Testing – DemystifiedATAGTR2017 Artificial Intelligence in Software Testing – Demystified
ATAGTR2017 Artificial Intelligence in Software Testing – Demystified
 
ATAGTR2017 Performance Automation in Dev-Ops
ATAGTR2017 Performance Automation in Dev-OpsATAGTR2017 Performance Automation in Dev-Ops
ATAGTR2017 Performance Automation in Dev-Ops
 
ATAGTR2017 Performance Testing and Non-Functional Testing Strategy for Big Da...
ATAGTR2017 Performance Testing and Non-Functional Testing Strategy for Big Da...ATAGTR2017 Performance Testing and Non-Functional Testing Strategy for Big Da...
ATAGTR2017 Performance Testing and Non-Functional Testing Strategy for Big Da...
 
Ast in CI/CD by Ofer Maor
Ast in CI/CD by Ofer MaorAst in CI/CD by Ofer Maor
Ast in CI/CD by Ofer Maor
 
Measuring your way_to_successful_automation_webinar
Measuring your way_to_successful_automation_webinarMeasuring your way_to_successful_automation_webinar
Measuring your way_to_successful_automation_webinar
 
The Push From Within - A Journey of Transformation at Walmart Labs by Claude ...
The Push From Within - A Journey of Transformation at Walmart Labs by Claude ...The Push From Within - A Journey of Transformation at Walmart Labs by Claude ...
The Push From Within - A Journey of Transformation at Walmart Labs by Claude ...
 
From rogue one to rebel alliance by Peter Chestna
From rogue one to rebel alliance by Peter ChestnaFrom rogue one to rebel alliance by Peter Chestna
From rogue one to rebel alliance by Peter Chestna
 
CP-SAT - Certified Professional Selenium Automation Testing
CP-SAT - Certified Professional Selenium Automation TestingCP-SAT - Certified Professional Selenium Automation Testing
CP-SAT - Certified Professional Selenium Automation Testing
 
Security as Code: A DevSecOps Approach
Security as Code: A DevSecOps ApproachSecurity as Code: A DevSecOps Approach
Security as Code: A DevSecOps Approach
 
Building Trust in Automated Tests
Building Trust in Automated TestsBuilding Trust in Automated Tests
Building Trust in Automated Tests
 
Sri monthly presentation 2016
Sri monthly presentation 2016Sri monthly presentation 2016
Sri monthly presentation 2016
 
Why to DevSecOps - Introduction of Bangalore Azure Group meetup
Why to DevSecOps - Introduction of Bangalore Azure Group meetupWhy to DevSecOps - Introduction of Bangalore Azure Group meetup
Why to DevSecOps - Introduction of Bangalore Azure Group meetup
 
Henrique Dantas - API fuzzing using Swagger
Henrique Dantas - API fuzzing using SwaggerHenrique Dantas - API fuzzing using Swagger
Henrique Dantas - API fuzzing using Swagger
 
Devops: Security's big opportunity by Peter Chestna
Devops: Security's big opportunity by Peter ChestnaDevops: Security's big opportunity by Peter Chestna
Devops: Security's big opportunity by Peter Chestna
 
Sri monthly presentation 2015
Sri monthly presentation 2015Sri monthly presentation 2015
Sri monthly presentation 2015
 
Enterprise Ready Test Execution Platform for Mobile Apps
Enterprise Ready Test Execution Platform for Mobile AppsEnterprise Ready Test Execution Platform for Mobile Apps
Enterprise Ready Test Execution Platform for Mobile Apps
 
Matt carroll - "Security patching system packages is fun" said no-one ever
Matt carroll - "Security patching system packages is fun" said no-one everMatt carroll - "Security patching system packages is fun" said no-one ever
Matt carroll - "Security patching system packages is fun" said no-one ever
 
Making the Transition from Manual to Automated Testing
Making the Transition from Manual to Automated TestingMaking the Transition from Manual to Automated Testing
Making the Transition from Manual to Automated Testing
 

Viewers also liked

Viewers also liked (14)

ATAGTR2017 Keeping pace with Product Evolution: UI Automation Framework Guide...
ATAGTR2017 Keeping pace with Product Evolution: UI Automation Framework Guide...ATAGTR2017 Keeping pace with Product Evolution: UI Automation Framework Guide...
ATAGTR2017 Keeping pace with Product Evolution: UI Automation Framework Guide...
 
ATAGTR2017 Be a User first, then a tester!
ATAGTR2017 Be a User first, then a tester! ATAGTR2017 Be a User first, then a tester!
ATAGTR2017 Be a User first, then a tester!
 
ATAGTR2017 Upgrading a mobile tester's weapons with advanced debugging
ATAGTR2017 Upgrading a mobile tester's weapons with advanced debuggingATAGTR2017 Upgrading a mobile tester's weapons with advanced debugging
ATAGTR2017 Upgrading a mobile tester's weapons with advanced debugging
 
ATAGTR2017 Unified APM: The new age performance monitoring for production sys...
ATAGTR2017 Unified APM: The new age performance monitoring for production sys...ATAGTR2017 Unified APM: The new age performance monitoring for production sys...
ATAGTR2017 Unified APM: The new age performance monitoring for production sys...
 
ATAGTR2017 Estimation in Agile Testing - Not a big deal rather it's Fun
ATAGTR2017 Estimation in Agile Testing - Not a big deal rather it's FunATAGTR2017 Estimation in Agile Testing - Not a big deal rather it's Fun
ATAGTR2017 Estimation in Agile Testing - Not a big deal rather it's Fun
 
ATAGTR2017 The way to recover the issue faced in IoT regression Testing
ATAGTR2017 The way to recover the issue faced in IoT regression TestingATAGTR2017 The way to recover the issue faced in IoT regression Testing
ATAGTR2017 The way to recover the issue faced in IoT regression Testing
 
ATAGTR2017 Testing in DevOps Culture
ATAGTR2017 Testing in DevOps CultureATAGTR2017 Testing in DevOps Culture
ATAGTR2017 Testing in DevOps Culture
 
ATAGTR2017 Performance Testing of Big Data Application
ATAGTR2017 Performance Testing of Big Data ApplicationATAGTR2017 Performance Testing of Big Data Application
ATAGTR2017 Performance Testing of Big Data Application
 
ATAGTR2017 Batch Workload Modelling and Performance Optimization
ATAGTR2017 Batch Workload Modelling and Performance Optimization ATAGTR2017 Batch Workload Modelling and Performance Optimization
ATAGTR2017 Batch Workload Modelling and Performance Optimization
 
ATAGTR2017 An Innovative Take on Versa Test
ATAGTR2017 An Innovative Take on Versa TestATAGTR2017 An Innovative Take on Versa Test
ATAGTR2017 An Innovative Take on Versa Test
 
ATAGTR2017 Differentiation using Testing Tools and Automation in the BFS COTS...
ATAGTR2017 Differentiation using Testing Tools and Automation in the BFS COTS...ATAGTR2017 Differentiation using Testing Tools and Automation in the BFS COTS...
ATAGTR2017 Differentiation using Testing Tools and Automation in the BFS COTS...
 
ATAGTR2017 Blockchain Based Testing
ATAGTR2017 Blockchain Based TestingATAGTR2017 Blockchain Based Testing
ATAGTR2017 Blockchain Based Testing
 
BDD along with Continuous Integration
BDD along with Continuous IntegrationBDD along with Continuous Integration
BDD along with Continuous Integration
 
Test Engagement - Vishal Prasad
Test Engagement - Vishal PrasadTest Engagement - Vishal Prasad
Test Engagement - Vishal Prasad
 

Similar to ATAGTR2017 Test the REST

Introduction to Back End Automation Testing - Nguyen Vu Hoang, Hoang Phi
Introduction to Back End Automation Testing - Nguyen Vu Hoang, Hoang PhiIntroduction to Back End Automation Testing - Nguyen Vu Hoang, Hoang Phi
Introduction to Back End Automation Testing - Nguyen Vu Hoang, Hoang Phi
Ho Chi Minh City Software Testing Club
 
Cerberus_Presentation1
Cerberus_Presentation1Cerberus_Presentation1
Cerberus_Presentation1
CIVEL Benoit
 

Similar to ATAGTR2017 Test the REST (20)

Rest assured
Rest assuredRest assured
Rest assured
 
Writing Acceptance Tests Using Fitnesse
Writing Acceptance Tests Using FitnesseWriting Acceptance Tests Using Fitnesse
Writing Acceptance Tests Using Fitnesse
 
From Monoliths to Microservices at Realestate.com.au
From Monoliths to Microservices at Realestate.com.auFrom Monoliths to Microservices at Realestate.com.au
From Monoliths to Microservices at Realestate.com.au
 
Rest Assured
Rest AssuredRest Assured
Rest Assured
 
Choosing right-automation-tool
Choosing right-automation-toolChoosing right-automation-tool
Choosing right-automation-tool
 
Rayudu_Grandhi
Rayudu_GrandhiRayudu_Grandhi
Rayudu_Grandhi
 
Raghavendra_SQA_Resume
Raghavendra_SQA_ResumeRaghavendra_SQA_Resume
Raghavendra_SQA_Resume
 
No Devops Without Continuous Testing
No Devops Without Continuous TestingNo Devops Without Continuous Testing
No Devops Without Continuous Testing
 
Automated Acceptance Tests & Tool choice
Automated Acceptance Tests & Tool choiceAutomated Acceptance Tests & Tool choice
Automated Acceptance Tests & Tool choice
 
Modern software testing and processes 2019
Modern software testing and processes 2019Modern software testing and processes 2019
Modern software testing and processes 2019
 
An Essential Guide to Effective Test Automation Leveraging Open Source
An Essential Guide to Effective Test Automation Leveraging Open SourceAn Essential Guide to Effective Test Automation Leveraging Open Source
An Essential Guide to Effective Test Automation Leveraging Open Source
 
API Governance and GitOps in Hybrid Integration Platform (MuleSoft)
API Governance and GitOps in Hybrid Integration Platform (MuleSoft)API Governance and GitOps in Hybrid Integration Platform (MuleSoft)
API Governance and GitOps in Hybrid Integration Platform (MuleSoft)
 
Business Applications Integration In The Cloud
Business Applications Integration In The CloudBusiness Applications Integration In The Cloud
Business Applications Integration In The Cloud
 
Introduction to Back End Automation Testing - Nguyen Vu Hoang, Hoang Phi
Introduction to Back End Automation Testing - Nguyen Vu Hoang, Hoang PhiIntroduction to Back End Automation Testing - Nguyen Vu Hoang, Hoang Phi
Introduction to Back End Automation Testing - Nguyen Vu Hoang, Hoang Phi
 
Solving micro-services and one site problem
Solving micro-services and one site problemSolving micro-services and one site problem
Solving micro-services and one site problem
 
Structured Functional Automated Web Service Testing
Structured Functional Automated Web Service TestingStructured Functional Automated Web Service Testing
Structured Functional Automated Web Service Testing
 
Cerberus_Presentation1
Cerberus_Presentation1Cerberus_Presentation1
Cerberus_Presentation1
 
Cerberus : Framework for Manual and Automated Testing (Web Application)
Cerberus : Framework for Manual and Automated Testing (Web Application)Cerberus : Framework for Manual and Automated Testing (Web Application)
Cerberus : Framework for Manual and Automated Testing (Web Application)
 
Ashish Baraiya
Ashish BaraiyaAshish Baraiya
Ashish Baraiya
 
Harman deepak v - agile on steriod - dev ops led transformation
Harman  deepak v - agile on steriod - dev ops led transformationHarman  deepak v - agile on steriod - dev ops led transformation
Harman deepak v - agile on steriod - dev ops led transformation
 

More from Agile Testing Alliance

More from Agile Testing Alliance (20)

#Interactive Session by Anindita Rath and Mahathee Dandibhotla, "From Good to...
#Interactive Session by Anindita Rath and Mahathee Dandibhotla, "From Good to...#Interactive Session by Anindita Rath and Mahathee Dandibhotla, "From Good to...
#Interactive Session by Anindita Rath and Mahathee Dandibhotla, "From Good to...
 
#Interactive Session by Ajay Balamurugadas, "Where Are The Real Testers In T...
#Interactive Session by  Ajay Balamurugadas, "Where Are The Real Testers In T...#Interactive Session by  Ajay Balamurugadas, "Where Are The Real Testers In T...
#Interactive Session by Ajay Balamurugadas, "Where Are The Real Testers In T...
 
#Interactive Session by Jishnu Nambiar and Mayur Ovhal, "Monitoring Web Per...
#Interactive Session by  Jishnu Nambiar and  Mayur Ovhal, "Monitoring Web Per...#Interactive Session by  Jishnu Nambiar and  Mayur Ovhal, "Monitoring Web Per...
#Interactive Session by Jishnu Nambiar and Mayur Ovhal, "Monitoring Web Per...
 
#Interactive Session by Pradipta Biswas and Sucheta Saurabh Chitale, "Navigat...
#Interactive Session by Pradipta Biswas and Sucheta Saurabh Chitale, "Navigat...#Interactive Session by Pradipta Biswas and Sucheta Saurabh Chitale, "Navigat...
#Interactive Session by Pradipta Biswas and Sucheta Saurabh Chitale, "Navigat...
 
#Interactive Session by Apoorva Ram, "The Art of Storytelling for Testers" at...
#Interactive Session by Apoorva Ram, "The Art of Storytelling for Testers" at...#Interactive Session by Apoorva Ram, "The Art of Storytelling for Testers" at...
#Interactive Session by Apoorva Ram, "The Art of Storytelling for Testers" at...
 
#Interactive Session by Nikhil Jain, "Catch All Mail With Graph" at #ATAGTR2023.
#Interactive Session by Nikhil Jain, "Catch All Mail With Graph" at #ATAGTR2023.#Interactive Session by Nikhil Jain, "Catch All Mail With Graph" at #ATAGTR2023.
#Interactive Session by Nikhil Jain, "Catch All Mail With Graph" at #ATAGTR2023.
 
#Interactive Session by Ashok Kumar S, "Test Data the key to robust test cove...
#Interactive Session by Ashok Kumar S, "Test Data the key to robust test cove...#Interactive Session by Ashok Kumar S, "Test Data the key to robust test cove...
#Interactive Session by Ashok Kumar S, "Test Data the key to robust test cove...
 
#Interactive Session by Seema Kohli, "Test Leadership in the Era of Artificia...
#Interactive Session by Seema Kohli, "Test Leadership in the Era of Artificia...#Interactive Session by Seema Kohli, "Test Leadership in the Era of Artificia...
#Interactive Session by Seema Kohli, "Test Leadership in the Era of Artificia...
 
#Interactive Session by Ashwini Lalit, RRR of Test Automation Maintenance" at...
#Interactive Session by Ashwini Lalit, RRR of Test Automation Maintenance" at...#Interactive Session by Ashwini Lalit, RRR of Test Automation Maintenance" at...
#Interactive Session by Ashwini Lalit, RRR of Test Automation Maintenance" at...
 
#Interactive Session by Srithanga Aishvarya T, "Machine Learning Model to aut...
#Interactive Session by Srithanga Aishvarya T, "Machine Learning Model to aut...#Interactive Session by Srithanga Aishvarya T, "Machine Learning Model to aut...
#Interactive Session by Srithanga Aishvarya T, "Machine Learning Model to aut...
 
#Interactive Session by Kirti Ranjan Satapathy and Nandini K, "Elements of Qu...
#Interactive Session by Kirti Ranjan Satapathy and Nandini K, "Elements of Qu...#Interactive Session by Kirti Ranjan Satapathy and Nandini K, "Elements of Qu...
#Interactive Session by Kirti Ranjan Satapathy and Nandini K, "Elements of Qu...
 
#Interactive Session by Sudhir Upadhyay and Ashish Kumar, "Strengthening Test...
#Interactive Session by Sudhir Upadhyay and Ashish Kumar, "Strengthening Test...#Interactive Session by Sudhir Upadhyay and Ashish Kumar, "Strengthening Test...
#Interactive Session by Sudhir Upadhyay and Ashish Kumar, "Strengthening Test...
 
#Interactive Session by Sayan Deb Kundu, "Testing Gen AI Applications" at #AT...
#Interactive Session by Sayan Deb Kundu, "Testing Gen AI Applications" at #AT...#Interactive Session by Sayan Deb Kundu, "Testing Gen AI Applications" at #AT...
#Interactive Session by Sayan Deb Kundu, "Testing Gen AI Applications" at #AT...
 
#Interactive Session by Dinesh Boravke, "Zero Defects – Myth or Reality" at #...
#Interactive Session by Dinesh Boravke, "Zero Defects – Myth or Reality" at #...#Interactive Session by Dinesh Boravke, "Zero Defects – Myth or Reality" at #...
#Interactive Session by Dinesh Boravke, "Zero Defects – Myth or Reality" at #...
 
#Interactive Session by Saby Saurabh Bhardwaj, "Redefine Quality Assurance –...
#Interactive Session by  Saby Saurabh Bhardwaj, "Redefine Quality Assurance –...#Interactive Session by  Saby Saurabh Bhardwaj, "Redefine Quality Assurance –...
#Interactive Session by Saby Saurabh Bhardwaj, "Redefine Quality Assurance –...
 
#Keynote Session by Sanjay Kumar, "Innovation Inspired Testing!!" at #ATAGTR2...
#Keynote Session by Sanjay Kumar, "Innovation Inspired Testing!!" at #ATAGTR2...#Keynote Session by Sanjay Kumar, "Innovation Inspired Testing!!" at #ATAGTR2...
#Keynote Session by Sanjay Kumar, "Innovation Inspired Testing!!" at #ATAGTR2...
 
#Keynote Session by Schalk Cronje, "Don’t Containerize me" at #ATAGTR2023.
#Keynote Session by Schalk Cronje, "Don’t Containerize me" at #ATAGTR2023.#Keynote Session by Schalk Cronje, "Don’t Containerize me" at #ATAGTR2023.
#Keynote Session by Schalk Cronje, "Don’t Containerize me" at #ATAGTR2023.
 
#Interactive Session by Chidambaram Vetrivel and Venkatesh Belde, "Revolution...
#Interactive Session by Chidambaram Vetrivel and Venkatesh Belde, "Revolution...#Interactive Session by Chidambaram Vetrivel and Venkatesh Belde, "Revolution...
#Interactive Session by Chidambaram Vetrivel and Venkatesh Belde, "Revolution...
 
#Interactive Session by Aniket Diwakar Kadukar and Padimiti Vaidik Eswar Dat...
#Interactive Session by Aniket Diwakar Kadukar and  Padimiti Vaidik Eswar Dat...#Interactive Session by Aniket Diwakar Kadukar and  Padimiti Vaidik Eswar Dat...
#Interactive Session by Aniket Diwakar Kadukar and Padimiti Vaidik Eswar Dat...
 
#Interactive Session by Vivek Patle and Jahnavi Umarji, "Empowering Functiona...
#Interactive Session by Vivek Patle and Jahnavi Umarji, "Empowering Functiona...#Interactive Session by Vivek Patle and Jahnavi Umarji, "Empowering Functiona...
#Interactive Session by Vivek Patle and Jahnavi Umarji, "Empowering Functiona...
 

Recently uploaded

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 

ATAGTR2017 Test the REST

  • 1. #ATAGTR2017 16th 17th March TEST THE REST Varun Deshpande
  • 2. Agile Testing Alliance Global Testing Retreat 2017 What is the REST • REST (REpresentational State Transfer) is an architectural style, and an approach to communications that is often used in the development of Web Services • REST uses HTTP protocols to communicate between producer and consumers. • HTTP Methods:- GET, POST, PUT, DELETE • Working with URL’s
  • 3. Agile Testing Alliance Global Testing Retreat 2017 Example of GET Request
  • 4. Agile Testing Alliance Global Testing Retreat 2017 Why API Automation Required? 1.Early Defect Detection:- Most of the time UI layer users the REST Web services to fetch the data from back end and do the business validation. If their are any issue with the REST services, It will be found before the developers actually consumer that web services. It will saves the development time over the defected web services. 2.Contract Validation:- In distributed environment different scrum teams are involved in development the single functionality. In this case suppose a scrum team changes the some parameters related to a web service which was consume by your team in last spring and they failed to notify your team. This situation leads to a production detect of that functionality which you have not touched in the current sprint. so validating contact is necessary thing. 3.Stops the further build:- If a test failed in Jenkins automation environment, It stops the further build unless that error is rectified. Which assured that only good build pass to manual testers for testing.
  • 5. Agile Testing Alliance Global Testing Retreat 2017 Why API Automation Required? 4.Fast Result:- API Automation test jobs took very less time to complete the one testing cycle. this help in automating the regression suit for an application. This will very helpful in CICD (Continuous Integration, Continuous Deployment) environments. 5.Reliable :- If these test are passed without any issue then we can sure that business layer is not having any defect. 6.Test Pyramid:- API Automation involves significant role in building the test pyramid. As the after the unit test cases it comes with majority of numbers. Which helps overall automation framework
  • 6. Agile Testing Alliance Global Testing Retreat 2017 What is a REST Assured:- • Testing and validating REST services in Java is harder than in dynamic languages such as Ruby and Groovy. REST Assured brings the simplicity of using these languages into the Java domain. • REST Assured is a simple Java library for testing of REST services. • Integrates seamlessly with existing Java based testing frameworks – Junit, TestNG – Selenium Webdriver • Rest Assured features – Supports for HTTP methods – Supports for BDD/Gherkin(Given, When, Then) – Use of Hamcrest matches for checks (equalTo) – Use of Gpath for selecting element from JSON response.
  • 7. Agile Testing Alliance Global Testing Retreat 2017 What is a REST Assured Gives:- • It gives various methods to 1. format the HTTP request 2. send it over a network 3. validating HTTP status code of an request 4. Finally validating response data. • It also handles the various authentication mechanism for the REST Requests 1. Basic Authentication(with username and password) 2. OAuth 3. OAuth 2.0 4. Certificates 5. Digest 6. Form based authentication
  • 8. Agile Testing Alliance Global Testing Retreat 2017 Getting Started with REST Assured:- Maven Dependency of REST Assured <dependency> <groupId>io.rest-assured</groupId> <artifactId>rest-assured</artifactId> <version>3.0.1</version> <scope>test</scope> </dependency>
  • 9. Agile Testing Alliance Global Testing Retreat 2017 Writing theTest
  • 10. Agile Testing Alliance Global Testing Retreat 2017 Getting Started with REST Assured:- For HTTP GET Request response = given() .contentType("application/json“) .auth() .basic(authData.getUserName(),authData.getPassword()) .when() .get(url);
  • 11. #ATAGTR2017 16th 17th March Thank You Varun Deshpande