Getting started with REST API Testing
Smarttesting - every software deserves one
Getting started with REST API Testing Andrei-Mihai Contan Tester - - PowerPoint PPT Presentation
Smarttesting - every software deserves one Getting started with REST API Testing Andrei-Mihai Contan Tester for more than 12 years, currently a Test Architect, co-founder of Romanian Testing Conference and triathlete About me Phd
Smarttesting - every software deserves one
About me
Andrei-Mihai Contan
a Test Architect, co-founder of Romanian Testing Conference and triathlete
Sciences in the area of Software Testing”
What is REST?
Roy Thomas Fielding, REST inventor
April, 2017
Is this just another presentation about REST? Almost each product claims to be RESTful Internet is full
about REST ….but what does REST mean?
REST is…
distributed hypermedia systems
claim that their product is RESTful, but in fact it is not.
REST is…
architectural constraints. An application which fulfills all the constraints can be called RESTful
REST CONSTRAINTS
Layer, Business Logic Layer, Presentation Layer)
REST is not…
everything
REST
an abstraction of the architectural elements within distributed hypermedia system.
implementation and protocol syntax in order to focus on the role of components, constraints of their interaction and their interpretation
Performance Scalability Simplicity Modifiability Visibility Portability Reliability
http://whatisrest.com/rest_architectural_goals/index
REST?
used
HTTP CALL HTTP CALL
REST over HTTP Template
GET https://api.randomuser.me/users?nat=GB&gender=male
Protocol URL QuestionMark Query Params QueryParams Delimiter HTTP Verb resource
Operation Type HTTP verb Obs CREATE POST Creates data READ GET Retrieves data UPDATE PUT Modifies data DELETE DELETE Deletes Data
“Teams need to look beyond just testing for functional and behavioral
move upward to ensure what they are externalizing to internal and/or external developers is complete.” SOLUTION
BEHAVIORAL
https://www.joecolantonio.com/2015/12/09/w hy-the-testing-pyramid-is-misleading-think- scales/
Behavioral API Testing Contractual API Testing Solution-oriented API Testing
SFDIPOT
SFDIPOT
SFDIPOT
SFDIPOT
Some tools available
Client
Know your API Identify input parameters and types Look at your API as a product Look for endpoints Identify types of
Test it thoroughly
Error handling
01
Error codes
02
Params tampering
03
SQL Injections
04
Concurren cy
05
Content- Types
06
Data validation
07
REST TESTING SKILLS
knowledge
Summary
architectural style, a guideline
K.I.L.L.I.T.
tool - D.E.B.U.T