SlideShare a Scribd company logo
Wszystko co
chcieliscie
wiedziec o REST
API
Aleksander Zaleski
Agenda
Introduction
REST ASSURED
HTTP
REST API
API Testing Tips and Tricks
Hangover
Zone
Comfort Zone
What is it there for me?
Test your knowledge
Find out what you don’t know
Get tips on learning pathway
Have fun!
Quiz Rules
Fair play. One attempt only.
More points for faster correct answer
Use last 5 digits of your phone number as a login
All results are final. No appeals.
Have fun!
Quiz Time
API
Application Program Interface -
is the means by which third parties
can write code that interfaces with
other code.
REST
is a software architectural style that
defines a set of constraints to be
used for creating Web services.
Web Services
Type of API
is used to exchange data between applications
interface specified as a Web Service Description Language
almost always operates over HTTP
Protocols include SOAP and REST
Resource - Any information that can be named can
be a resource: a document or image, a temporal
service (e.g. "today's weather in Los Angeles")
readers/{pesel}
books/{id}/authors/{id}
1. Contract first approach /
Uniform Resource
Identifiers
The 5 principles of REST
2. Stateless
22
The 5 principles of REST
Each request must contain all of the information
necessary to be understood by the server.
Storing session state on the server violates this
constraint.
Session state must be handled entirely by the client.
3. Client-Server model
Most often HTTP(S), but
could be SNMP, SMTP etc
The 5 principles of REST
4. Caching
The 5 principles of REST
5.Layered architecture
The 5 principles of REST
REST basics
Separate your API into logical resources.
Use nouns, not verbs for resources
Use verbs GET, POST, PUT,PATCH,DELETE* etc to
describe actions
readers/{pesel}
books/{isbn}/authors/{id}
books/{isbn}/authors/{id}/editions/{nr}
HTTP
Quiz Time
http://lazyheap.com/http-verbs-details-meaning-usage/
wikipedia:HTTP
HTTP status response codes
1xx: hold on (info)
2xx: Here you go (success)
3xx: I am elsewhere (redirect)
4xx: Your fault (client error)
5xx: My fault (server error)
HTTP status response codes
200: OK
201: Created
202: Accepted
204: No content
HTTP status response codes
400 Bad Request
401 Unauthorised
403 Forbidden
404 Not Found
4xx response codes
405 Method Not Allowed
406 Not Acceptable
408 Request Timeout
451 Unavailable For Legal
Reasons
5xx response codes
500 Internal Server Error
501 Not Implemented
502 Bad Gateway
503 Service Unavailable
504 Gateway Timeout
HTTP headers
Created by:
API Testing Tips and Tricks
API Testing Pyramid
Behavior
Solution
Oriented
Contract
By James Higginbotham
Heuristics
DEED HELP GC
ICE OVER MAD
POISED
PAPAS BE @ SFO
VADER
DVLA PC
Heuristics are POISED!
Parameters
Output
Inter-operability
Security
Error Handling
Data By Amber Race
P - parameters
Boundary values testing on these parameters
Empty/null/whitespace on one or more
Big List of naughty strings
Add or Delete parameter
Change Data Type
VADER Heuristics
Verbs
Authentication
Data
Errors
Responsiveness
By Linda Roy
ICE OVER MAD
Integration
Consumers
Endpoints
Operations
Volume
Error Handling
RESTful
Modularity
Authentication
Definition
By Ash Winter
REST Assured
Awaitilty
Quiz Time
REST ASSURED
01 Fluent BDD-friendly syntax
.given(arrange)
. when(act)
. then(assert)
02 Built-in Schema validator, parser and matcher (e.g. jsonPath)
REST ASSURED
Many ways to set request parameters Logging
Verifying Response Data
Measure Response Time
Flexible Object mapping to/from JSON/XML
REST ASSURED ─ Example
REST ASSURED ─ Example
Awaitility
Java DSL that allows you to express expectations of
an asynchronous system in a concise and easy to
read manner.
Awaitility
Awaitility
What to do next?
Watch TAU courses on REST API (Bas Dijkstra and Amber Race)
Play with API: SWAPI or https://restful-booker.herokuapp.com/
Write API tests for e.g. MrBuggy7
Read Allan Richardson book about REST API testing
(compendiumdev.co.uk)
Prepare your own quiz
References
https://github.com/szekar1/API-testing-docs
https://www.danieldonbavand.com/testing-mnemonics/
https://apitester.com/ - create your tests without coding
Thank you for
participation!

More Related Content

What's hot

Concepts for Operating a Web Site
Concepts for Operating a Web SiteConcepts for Operating a Web Site
Concepts for Operating a Web Site
Can Burak Çilingir
 
REST API Design & Development
REST API Design & DevelopmentREST API Design & Development
REST API Design & Development
Ashok Pundit
 
CORS and (in)security
CORS and (in)securityCORS and (in)security
CORS and (in)security
n|u - The Open Security Community
 
REST API and CRUD
REST API and CRUDREST API and CRUD
REST API and CRUD
Prem Sanil
 
The Internet as Web Services: introduction to ReST
The Internet as Web Services: introduction to ReSTThe Internet as Web Services: introduction to ReST
The Internet as Web Services: introduction to ReST
Bruno Kessler Foundation
 
Design Beautiful REST + JSON APIs
Design Beautiful REST + JSON APIsDesign Beautiful REST + JSON APIs
Design Beautiful REST + JSON APIs
Stormpath
 
Proxy log review and use cases
Proxy log review and use casesProxy log review and use cases
Proxy log review and use cases
Mostafa Yahia
 
The Top Tips You need to Learn about Data in your Mobile App
The Top Tips You need to Learn about Data in your Mobile AppThe Top Tips You need to Learn about Data in your Mobile App
The Top Tips You need to Learn about Data in your Mobile App
Woodruff Solutions LLC
 
Rest API
Rest APIRest API
Whoops! 404 Error!
Whoops! 404 Error!Whoops! 404 Error!
Whoops! 404 Error!
freeforextools
 

What's hot (10)

Concepts for Operating a Web Site
Concepts for Operating a Web SiteConcepts for Operating a Web Site
Concepts for Operating a Web Site
 
REST API Design & Development
REST API Design & DevelopmentREST API Design & Development
REST API Design & Development
 
CORS and (in)security
CORS and (in)securityCORS and (in)security
CORS and (in)security
 
REST API and CRUD
REST API and CRUDREST API and CRUD
REST API and CRUD
 
The Internet as Web Services: introduction to ReST
The Internet as Web Services: introduction to ReSTThe Internet as Web Services: introduction to ReST
The Internet as Web Services: introduction to ReST
 
Design Beautiful REST + JSON APIs
Design Beautiful REST + JSON APIsDesign Beautiful REST + JSON APIs
Design Beautiful REST + JSON APIs
 
Proxy log review and use cases
Proxy log review and use casesProxy log review and use cases
Proxy log review and use cases
 
The Top Tips You need to Learn about Data in your Mobile App
The Top Tips You need to Learn about Data in your Mobile AppThe Top Tips You need to Learn about Data in your Mobile App
The Top Tips You need to Learn about Data in your Mobile App
 
Rest API
Rest APIRest API
Rest API
 
Whoops! 404 Error!
Whoops! 404 Error!Whoops! 404 Error!
Whoops! 404 Error!
 

Similar to REST API Quizes TestWarez 2019

An Introduction To REST API
An Introduction To REST APIAn Introduction To REST API
An Introduction To REST API
Aniruddh Bhilvare
 
Understanding APIs.pptx
Understanding APIs.pptxUnderstanding APIs.pptx
Understanding APIs.pptx
Sherif Ali , MBA , ITIL , IBDL
 
Understanding APIs.pptx introduction chk
Understanding APIs.pptx introduction chkUnderstanding APIs.pptx introduction chk
Understanding APIs.pptx introduction chk
nooreen nayyar syeda
 
RESTful services
RESTful servicesRESTful services
RESTful services
gouthamrv
 
Austin Day of Rest - Introduction
Austin Day of Rest - IntroductionAustin Day of Rest - Introduction
Austin Day of Rest - Introduction
HandsOnWP.com
 
Coding 100-session-slides
Coding 100-session-slidesCoding 100-session-slides
Coding 100-session-slides
Cisco DevNet
 
Restful design at work v2.0
Restful design at work v2.0Restful design at work v2.0
Restful design at work v2.0
Boulder Java User's Group
 
REST APIs, Girls Who Code
REST APIs, Girls Who CodeREST APIs, Girls Who Code
REST APIs, Girls Who Code
Twitter Developers
 
Writing RESTful Web Services
Writing RESTful Web ServicesWriting RESTful Web Services
Writing RESTful Web Services
Paul Boocock
 
A Look at OData
A Look at ODataA Look at OData
A Look at OData
Woodruff Solutions LLC
 
Web Services Testing
Web Services TestingWeb Services Testing
Web Services Testing
DataArt
 
HTTP Basics Demo
HTTP Basics DemoHTTP Basics Demo
HTTP Basics Demo
InMobi Technology
 
Api 101
Api 101Api 101
REST API in Agile Testing by Fadly Mahendra
REST API in Agile Testing by Fadly MahendraREST API in Agile Testing by Fadly Mahendra
REST API in Agile Testing by Fadly Mahendra
Fadly Mahendra
 
HTTP Request and Response Structure
HTTP Request and Response StructureHTTP Request and Response Structure
HTTP Request and Response Structure
BhagyashreeGajera1
 
Webtechnologies
Webtechnologies Webtechnologies
Webtechnologies
-jyothish kumar sirigidi
 
Building with linked_in_api
Building with linked_in_apiBuilding with linked_in_api
Building with linked_in_api
MatchFWD
 
Api crash
Api crashApi crash
Api crash
Tony Nguyen
 
Api crash
Api crashApi crash
Api crash
Hoang Nguyen
 
Api crash
Api crashApi crash
Api crash
Fraboni Ec
 

Similar to REST API Quizes TestWarez 2019 (20)

An Introduction To REST API
An Introduction To REST APIAn Introduction To REST API
An Introduction To REST API
 
Understanding APIs.pptx
Understanding APIs.pptxUnderstanding APIs.pptx
Understanding APIs.pptx
 
Understanding APIs.pptx introduction chk
Understanding APIs.pptx introduction chkUnderstanding APIs.pptx introduction chk
Understanding APIs.pptx introduction chk
 
RESTful services
RESTful servicesRESTful services
RESTful services
 
Austin Day of Rest - Introduction
Austin Day of Rest - IntroductionAustin Day of Rest - Introduction
Austin Day of Rest - Introduction
 
Coding 100-session-slides
Coding 100-session-slidesCoding 100-session-slides
Coding 100-session-slides
 
Restful design at work v2.0
Restful design at work v2.0Restful design at work v2.0
Restful design at work v2.0
 
REST APIs, Girls Who Code
REST APIs, Girls Who CodeREST APIs, Girls Who Code
REST APIs, Girls Who Code
 
Writing RESTful Web Services
Writing RESTful Web ServicesWriting RESTful Web Services
Writing RESTful Web Services
 
A Look at OData
A Look at ODataA Look at OData
A Look at OData
 
Web Services Testing
Web Services TestingWeb Services Testing
Web Services Testing
 
HTTP Basics Demo
HTTP Basics DemoHTTP Basics Demo
HTTP Basics Demo
 
Api 101
Api 101Api 101
Api 101
 
REST API in Agile Testing by Fadly Mahendra
REST API in Agile Testing by Fadly MahendraREST API in Agile Testing by Fadly Mahendra
REST API in Agile Testing by Fadly Mahendra
 
HTTP Request and Response Structure
HTTP Request and Response StructureHTTP Request and Response Structure
HTTP Request and Response Structure
 
Webtechnologies
Webtechnologies Webtechnologies
Webtechnologies
 
Building with linked_in_api
Building with linked_in_apiBuilding with linked_in_api
Building with linked_in_api
 
Api crash
Api crashApi crash
Api crash
 
Api crash
Api crashApi crash
Api crash
 
Api crash
Api crashApi crash
Api crash
 

Recently uploaded

HijackLoader Evolution: Interactive Process Hollowing
HijackLoader Evolution: Interactive Process HollowingHijackLoader Evolution: Interactive Process Hollowing
HijackLoader Evolution: Interactive Process Hollowing
Donato Onofri
 
Bengaluru Dreamin' 24 - Personal Branding
Bengaluru Dreamin' 24 - Personal BrandingBengaluru Dreamin' 24 - Personal Branding
Bengaluru Dreamin' 24 - Personal Branding
Tarandeep Singh
 
Discover the benefits of outsourcing SEO to India
Discover the benefits of outsourcing SEO to IndiaDiscover the benefits of outsourcing SEO to India
Discover the benefits of outsourcing SEO to India
davidjhones387
 
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
rtunex8r
 
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
3a0sd7z3
 
一比一原版(USYD毕业证)悉尼大学毕业证如何办理
一比一原版(USYD毕业证)悉尼大学毕业证如何办理一比一原版(USYD毕业证)悉尼大学毕业证如何办理
一比一原版(USYD毕业证)悉尼大学毕业证如何办理
k4ncd0z
 
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
APNIC
 
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
thezot
 
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
3a0sd7z3
 
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
xjq03c34
 
Should Repositories Participate in the Fediverse?
Should Repositories Participate in the Fediverse?Should Repositories Participate in the Fediverse?
Should Repositories Participate in the Fediverse?
Paul Walk
 
Securing BGP: Operational Strategies and Best Practices for Network Defenders...
Securing BGP: Operational Strategies and Best Practices for Network Defenders...Securing BGP: Operational Strategies and Best Practices for Network Defenders...
Securing BGP: Operational Strategies and Best Practices for Network Defenders...
APNIC
 

Recently uploaded (12)

HijackLoader Evolution: Interactive Process Hollowing
HijackLoader Evolution: Interactive Process HollowingHijackLoader Evolution: Interactive Process Hollowing
HijackLoader Evolution: Interactive Process Hollowing
 
Bengaluru Dreamin' 24 - Personal Branding
Bengaluru Dreamin' 24 - Personal BrandingBengaluru Dreamin' 24 - Personal Branding
Bengaluru Dreamin' 24 - Personal Branding
 
Discover the benefits of outsourcing SEO to India
Discover the benefits of outsourcing SEO to IndiaDiscover the benefits of outsourcing SEO to India
Discover the benefits of outsourcing SEO to India
 
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
 
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
 
一比一原版(USYD毕业证)悉尼大学毕业证如何办理
一比一原版(USYD毕业证)悉尼大学毕业证如何办理一比一原版(USYD毕业证)悉尼大学毕业证如何办理
一比一原版(USYD毕业证)悉尼大学毕业证如何办理
 
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
 
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
 
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
 
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
 
Should Repositories Participate in the Fediverse?
Should Repositories Participate in the Fediverse?Should Repositories Participate in the Fediverse?
Should Repositories Participate in the Fediverse?
 
Securing BGP: Operational Strategies and Best Practices for Network Defenders...
Securing BGP: Operational Strategies and Best Practices for Network Defenders...Securing BGP: Operational Strategies and Best Practices for Network Defenders...
Securing BGP: Operational Strategies and Best Practices for Network Defenders...
 

REST API Quizes TestWarez 2019