SlideShare a Scribd company logo
1 of 37
Increase Automation to
REST
Understanding Web Services
and how to test them
Shiva..
Expectations
What are you hoping to get from this session?
Key
Take
Aways:
❏ What Web Services are and why we
use them
❏ How to test a Web Service in
multiple ways
❏ Increased familiarity with test
automation
Web Services
● A functionality to be offered
over Web.
● Uses HTTP/HTTPS/SMTP for
communication
● Communicates using
JSON/XML/CSV/Plain Text etc.
When and Why
Same functionality multiple UIs:
● Customise cross platform
● Multiple apps
● Different vendors
Being able to implement one
service and use that functionality
across all these different displays
Let see an example!
...things get clearer when you can see them :)
An Example
Booking a ticket with Orange Bus via
different agencies
RedBus UI
TravelYaari
UI
Orange Bus UI
Book
a seat
Book
a seat
Get bus
details
Orange Bus Web Service
Another Example
curl -X GET http://api.wunderground.com/api/68826afac600251b/conditions/q/zmw:00000.18.43063.json
https://learn.adafruit.com
REpresentational State
Transfer (REST)
● Uses HTTP(S) for CRUD
operations
● Uniform Resource Identifiers
(URIs)
● New alternative to SOAP
Statelessness
Client
Load Balancer
Node 1 Node 2
API/Service Layer
API Layer
Presentation
Layer
Business Layer
Presentation
Layer
Presentation
Layer
What are APIs?
● Part of the web service which
receives requests/sends
responses
● Has one or more endpoints
● Documented contract
Requests and Responses
...lets see some examples...
Request
Request:
URI Method Headers DATA
https://dreamstw.herokuapp.com/dreams/
Response
Response
HeadersResponse Code Data
Requests
Common request types:
● GET
● POST
● PUT
● DELETE
Response Codes
Outcome of a request:
● 1xx - Informational
● 2xx - Success
● 3xx - Redirection
● 4xx - Client Error
● 5xx - Server Error
https://http.cat/
https://http.cat/
https://http.cat/
https://http.cat/
https://http.cat/
https://http.cat/
QAs and Web Services
...based on our experiences testing web services out in the wild...
How testing helps
● Business issues first then the
presentation issues
● Early feedback
● Debug in different layers
● Save time in retesting
● More confident that the app
works
● Release more frequently
● Lots more….
The role of QAs
Demo - try it yourself!
Manual in browser test
https://api.hitbtc.com/api/2/public/ticker/DOGEBTC
Postman
Sample Postman Request:
https://api.hitbtc.com/api/2/public/ticker/DOGEBTC
curl
Sample Curl Request:
curl -X GET https://api.hitbtc.com/api/2/public/ticker/DOGEBTC -H "Content-Type:
application/json" “Accept: application/json” -i
> curl _
Alternatives?
Cocoa Rest Client
IntelliJ REST
Plugin
Let’s automate it! - Java
Use Library: UniRest (Java)
Sample Test Scenario
public class TestDreams {
@Test
public void testGetDreams() throws UnirestException {
System.out.println("Testing Get Dreams.....");
String url = "https://api.hitbtc.com/api/2/public/ticker/DOGEBTC";
HttpResponse<JsonNode> jsonResponse = Unirest.get(url)
.header("Content-Type",
"application/json").asJson();
Assert.assertEquals(200, jsonResponse.getStatus());
Assert.assertNotNull(jsonResponse.getBody());
}
}
Let’s automate it! - Python
Use Package: Requests (Python)
Sample Test Scenario
import unittest
import requests
class TestDreams(unittest.TestCase):
def setUp(self):
self.url = 'https://api.hitbtc.com/api/2/public/ticker/DOGEBTC’
def test_should_verify_get_dreams(self):
print("Verifying Get Dreams....")
headers = {"Content-Type": "application/json"}
res = requests.get(url=self.url, headers=headers, verify=False)
self.assertEqual(200, res.status_code, "Response code doesn't match")
self.assertTrue(res.json())
Closing notes
...time flies when you’re automating tests...
Suggestions
● Automate as you go
● Cross role pairing
● Integrate with build pipeline
● If the service is broken no need
to test UI
● Spread the word! :)
Key
Take
Aways:
❏ What Web Services are and why we
use them
❏ How to test a Web Service in
multiple ways
❏ Increased familiarity with test
automation
Questions

More Related Content

What's hot

Automated Testing with Google Chrome - WebDriver- ChromeDriver
Automated Testing with Google Chrome - WebDriver- ChromeDriverAutomated Testing with Google Chrome - WebDriver- ChromeDriver
Automated Testing with Google Chrome - WebDriver- ChromeDriverManoj Kumar Kumar
 
HTML5 Multithreading
HTML5 MultithreadingHTML5 Multithreading
HTML5 MultithreadingAllan Huang
 
Server and Client side comparision
Server and Client side comparisionServer and Client side comparision
Server and Client side comparisionStew Duncan
 
Scheduling and monitoring with java in mule
Scheduling and monitoring with java in muleScheduling and monitoring with java in mule
Scheduling and monitoring with java in muleAnirban Sen Chowdhary
 
MobConf - session on C# async-await on 18june2016 at Kochi
MobConf - session on C# async-await on 18june2016 at KochiMobConf - session on C# async-await on 18june2016 at Kochi
MobConf - session on C# async-await on 18june2016 at KochiPraveen Nair
 
Java Servlet Lifecycle
Java Servlet LifecycleJava Servlet Lifecycle
Java Servlet LifecycleAathikaJava
 
single page application
single page applicationsingle page application
single page applicationRavindra K
 
Modern Web App Architectures
Modern Web App ArchitecturesModern Web App Architectures
Modern Web App ArchitecturesRaphael Stary
 
Websocket vs SSE - Paris.js - 24/06/15
Websocket vs SSE - Paris.js - 24/06/15Websocket vs SSE - Paris.js - 24/06/15
Websocket vs SSE - Paris.js - 24/06/15streamdata.io
 
Lecture 10 Answers
Lecture 10 AnswersLecture 10 Answers
Lecture 10 Answersis4030.ray
 
Validate soap request in mule
Validate soap request in muleValidate soap request in mule
Validate soap request in muleMohammed246
 

What's hot (19)

Isomorphic apps
Isomorphic appsIsomorphic apps
Isomorphic apps
 
Automated Testing with Google Chrome - WebDriver- ChromeDriver
Automated Testing with Google Chrome - WebDriver- ChromeDriverAutomated Testing with Google Chrome - WebDriver- ChromeDriver
Automated Testing with Google Chrome - WebDriver- ChromeDriver
 
HTML5 Multithreading
HTML5 MultithreadingHTML5 Multithreading
HTML5 Multithreading
 
Server and Client side comparision
Server and Client side comparisionServer and Client side comparision
Server and Client side comparision
 
Soap request in mule
Soap request in mule Soap request in mule
Soap request in mule
 
Creating dynamic json
Creating dynamic jsonCreating dynamic json
Creating dynamic json
 
Wcf remaining
Wcf remainingWcf remaining
Wcf remaining
 
Scheduling and monitoring with java in mule
Scheduling and monitoring with java in muleScheduling and monitoring with java in mule
Scheduling and monitoring with java in mule
 
Ajax and RJS
Ajax and RJSAjax and RJS
Ajax and RJS
 
MobConf - session on C# async-await on 18june2016 at Kochi
MobConf - session on C# async-await on 18june2016 at KochiMobConf - session on C# async-await on 18june2016 at Kochi
MobConf - session on C# async-await on 18june2016 at Kochi
 
Mule soap
Mule soapMule soap
Mule soap
 
Java Servlet Lifecycle
Java Servlet LifecycleJava Servlet Lifecycle
Java Servlet Lifecycle
 
single page application
single page applicationsingle page application
single page application
 
Web assembly with PWA
Web assembly with PWA Web assembly with PWA
Web assembly with PWA
 
Modern Web App Architectures
Modern Web App ArchitecturesModern Web App Architectures
Modern Web App Architectures
 
Websocket vs SSE - Paris.js - 24/06/15
Websocket vs SSE - Paris.js - 24/06/15Websocket vs SSE - Paris.js - 24/06/15
Websocket vs SSE - Paris.js - 24/06/15
 
Client and server side scripting
Client and server side scriptingClient and server side scripting
Client and server side scripting
 
Lecture 10 Answers
Lecture 10 AnswersLecture 10 Answers
Lecture 10 Answers
 
Validate soap request in mule
Validate soap request in muleValidate soap request in mule
Validate soap request in mule
 

Similar to Increase automation to rest

Increase automation to rest
Increase automation to restIncrease automation to rest
Increase automation to restvodQA
 
Unify service and ui layer automation bdd way.pptx (1)
Unify service and ui layer automation bdd way.pptx (1)Unify service and ui layer automation bdd way.pptx (1)
Unify service and ui layer automation bdd way.pptx (1)Shivaling Sannalli
 
cross-platform-assets-based-front-end-architecture
cross-platform-assets-based-front-end-architecturecross-platform-assets-based-front-end-architecture
cross-platform-assets-based-front-end-architectureOleksandr Tserkovnyi
 
PAC 2019 virtual Arjan Van Den Berg
PAC 2019 virtual Arjan Van Den Berg  PAC 2019 virtual Arjan Van Den Berg
PAC 2019 virtual Arjan Van Den Berg Neotys
 
Ajax Testing Approach
Ajax Testing ApproachAjax Testing Approach
Ajax Testing ApproachHarshJ
 
Ajax Testing Approach
Ajax Testing ApproachAjax Testing Approach
Ajax Testing ApproachHarshaVJoshi
 
Google App Engine Overview - BarCamp Phnom Penh 2011
Google App Engine Overview - BarCamp Phnom Penh 2011Google App Engine Overview - BarCamp Phnom Penh 2011
Google App Engine Overview - BarCamp Phnom Penh 2011traactivity
 
AK 3 web services using apache axis
AK 3   web services using apache axisAK 3   web services using apache axis
AK 3 web services using apache axisgauravashq
 
[drupalday2017] - Drupal come frontend che consuma servizi: HTTP Client Manager
[drupalday2017] - Drupal come frontend che consuma servizi: HTTP Client Manager[drupalday2017] - Drupal come frontend che consuma servizi: HTTP Client Manager
[drupalday2017] - Drupal come frontend che consuma servizi: HTTP Client ManagerDrupalDay
 
Load Impact
Load Impact Load Impact
Load Impact z-999
 
Client-Side Performance Testing
Client-Side Performance TestingClient-Side Performance Testing
Client-Side Performance TestingAnand Bagmar
 
Brug - Web push notification
Brug  - Web push notificationBrug  - Web push notification
Brug - Web push notificationOlga Lavrentieva
 
Meteor MIT Tech Talk 9/18/14: Designing a New Platform For Modern Apps
Meteor MIT Tech Talk 9/18/14: Designing a New Platform For Modern AppsMeteor MIT Tech Talk 9/18/14: Designing a New Platform For Modern Apps
Meteor MIT Tech Talk 9/18/14: Designing a New Platform For Modern AppsSashko Stubailo
 

Similar to Increase automation to rest (20)

Increase automation to rest
Increase automation to restIncrease automation to rest
Increase automation to rest
 
Increase automation to rest
Increase automation to restIncrease automation to rest
Increase automation to rest
 
Unify service and ui layer automation bdd way.pptx (1)
Unify service and ui layer automation bdd way.pptx (1)Unify service and ui layer automation bdd way.pptx (1)
Unify service and ui layer automation bdd way.pptx (1)
 
cross-platform-assets-based-front-end-architecture
cross-platform-assets-based-front-end-architecturecross-platform-assets-based-front-end-architecture
cross-platform-assets-based-front-end-architecture
 
PAC 2019 virtual Arjan Van Den Berg
PAC 2019 virtual Arjan Van Den Berg  PAC 2019 virtual Arjan Van Den Berg
PAC 2019 virtual Arjan Van Den Berg
 
Ajax Testing Approach
Ajax Testing ApproachAjax Testing Approach
Ajax Testing Approach
 
Ajax Testing Approach
Ajax Testing ApproachAjax Testing Approach
Ajax Testing Approach
 
Google App Engine Overview - BarCamp Phnom Penh 2011
Google App Engine Overview - BarCamp Phnom Penh 2011Google App Engine Overview - BarCamp Phnom Penh 2011
Google App Engine Overview - BarCamp Phnom Penh 2011
 
Browser Based Performance Testing and Tuning
Browser Based Performance Testing and TuningBrowser Based Performance Testing and Tuning
Browser Based Performance Testing and Tuning
 
AK 3 web services using apache axis
AK 3   web services using apache axisAK 3   web services using apache axis
AK 3 web services using apache axis
 
[drupalday2017] - Drupal come frontend che consuma servizi: HTTP Client Manager
[drupalday2017] - Drupal come frontend che consuma servizi: HTTP Client Manager[drupalday2017] - Drupal come frontend che consuma servizi: HTTP Client Manager
[drupalday2017] - Drupal come frontend che consuma servizi: HTTP Client Manager
 
ASP.NET WEB API Training
ASP.NET WEB API TrainingASP.NET WEB API Training
ASP.NET WEB API Training
 
Load Impact
Load Impact Load Impact
Load Impact
 
5-WebServers.ppt
5-WebServers.ppt5-WebServers.ppt
5-WebServers.ppt
 
Client-Side Performance Testing
Client-Side Performance TestingClient-Side Performance Testing
Client-Side Performance Testing
 
Cloud APIs Overview Tucker
Cloud APIs Overview   TuckerCloud APIs Overview   Tucker
Cloud APIs Overview Tucker
 
Brug - Web push notification
Brug  - Web push notificationBrug  - Web push notification
Brug - Web push notification
 
Progressive Web Apps
Progressive Web AppsProgressive Web Apps
Progressive Web Apps
 
HTTP Basics Demo
HTTP Basics DemoHTTP Basics Demo
HTTP Basics Demo
 
Meteor MIT Tech Talk 9/18/14: Designing a New Platform For Modern Apps
Meteor MIT Tech Talk 9/18/14: Designing a New Platform For Modern AppsMeteor MIT Tech Talk 9/18/14: Designing a New Platform For Modern Apps
Meteor MIT Tech Talk 9/18/14: Designing a New Platform For Modern Apps
 

Recently uploaded

The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 

Recently uploaded (20)

The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 

Increase automation to rest

Editor's Notes

  1. Shiva: What are WebServices; Importance of Web Services Learn How do we test a WebService using different tools and programming libraries Get familiarised with automating WebService.
  2. Shiva: Application A is written in 1 framework may be JAVA and SPRINGS, can use service available in other application.
  3. Shiva
  4. REST is one architectural approach to web services which is growing in popularity. It uses moslty the HTTP(S) protocol for CRUD functionality: creation, reading, updating and deleting of resources. URIs are the id of some data which is being referred to in the requeste SOAP (Simple Object Access Protocol) is a protocol with uses XML. Its an alternative to REST. SOAP was popular previously but systems built more recently would often be design in a RESTful way so we are seeing less and less SOAP now.
  5. A request cannot be dependent on a past request and a service treats each request independently. Assuming the system has enough load to require more than 1 node … which is pretty common … its important to consider how to handle the likely even where the first and second request go to different nodes or instances of the web service. A key part of a restful architecture is that each request from any client contains all the information necessary to service the request For instance a real world physical example, lets say we walk into a store, they are a huge company with stores all over the globe and thousands of staff members. We make an order with this company and they provide us with an id. If we want to check the status of this order we might not find outselves chatting to the exact staff member again, or they might have served another customer since then and forgotten us, it could be whichever staff member is free, or we might be in a different store. In order for the staff member to be able to responde to our status request we need to provide some information again along with the request. These staff members are like the nodes, they will all be looking at the same system to get your status, you walked into the same store or called the same number, but the nodes or staff themselves are individuals. So they need context on how to help you.
  6. Shiva:
  7. Shiva Mention “Application Programming Interface” - API
  8. Shiva Separate slide for request and response. Consider using a screenshot of postman.
  9. Shiva Separate slide for request and response. Consider using a screenshot of postman.
  10. Fiona Get - request a resource, header might be used to specify some conditions similar to a query. Should only read data and shouldnt effect its state. Post - provides some resource (or data) which the service will handle, could override, update, append, act upon... Put - provides some resource which will be placed exactly at that URI location. If there is something already put there it will be overridden Delete - removes the resource at the URI location. Could be stopped by the server but ideally shouldn't say it succeeded unless that resource was deleted but technically could
  11. Fiona There are a lot of potential responses but they can be grouped into these 5 main types. Error codes starting with there initial numbers help you to know which type they are. Lets cover some of the most common/important ones in more detail
  12. Success! Your request was fulfilled.
  13. Success! This request caused something to be created/added/updated successfully. Most likely you posted some data which cased this response
  14. Error, Oops, something went wrong. Seems like there’s a problem with the request you made.
  15. Error, Oops, something went wrong. Seems that you arent permitted to do that request or arent correctly proving your right to perform that request
  16. Error, Oops something went wrong. Seems that the request is correct and you have the permission but the thing you asked for isnt there
  17. Error on the other side. Seems like the web service you are making a request to has some issues.
  18. Shiva
  19. Shiva: UNIT Testing: Talk about TDD: example of writing tests first and developing later
  20. Fiona
  21. Fiona
  22. Shiva
  23. Shiva
  24. Shiva
  25. Shiva
  26. Shiva: Automate as you GO: Automate in parallel any other activies(Manual) Cross Role : Code Review, Stop a Bug before being raised , Developers as well can Test , Pairing with BAs can encounter which is missing in the business flow.
  27. Fiona
  28. Both