SlideShare a Scribd company logo
Quick start to Rest Assured
Szymon Ramczykowski
Lead Test Engineer/Workday Smart
Agenda
11/01/2018 2
1. Context
2. Authentication
3. GET Request
4. POST Request
5. PUT Request
6. END2END Scenarios
7. Summary
Rest Assured vs Selenium
11/01/2018 3
HTTP REQUESTS
11/01/2018 4
Client Server
GET/POST/PUT/DELETE
11/01/2018 5
Client Server
Resources/Endpoints
Examples
11/01/2018 6
GET https://sampleurl.fake/customers
POST https://sampleurl.fake/customer?name=Steve&surname=Doe
PUT https://sampleurl.fake/customer
DELETE https://sampleurl.fake/customer?id=983987as2
RestAssured
11/01/2018 7
http://rest-assured.io/
Tested application
11/01/2018 8
https://trello.com
https://developers.trello.com/v1.0/reference
Authentication
11/01/2018 9
Authentication
11/01/2018 10
VS https://trello.com/app-key
Authentication
Reuse authenticate method in specification
11/01/2018 11
Authentication
Summary
11/01/2018 12
Trello:
1. User name and password authentication
2. Key and token authentication
Other apps
1. Cookies
2. Tokens
3. Many more
GET
11/01/2018 13
1. View board data
2. View cards for given boards
3. View list for given boards
GET
Exercise 1- display board
11/01/2018 14
GET
Exercise 1- add authentication and endpoint
11/01/2018 15
GET
Exercise 1- add authentication and endpoint
11/01/2018 16
GET
Exercise 1- test method with pretty print
11/01/2018 17
GET
Exercise 1- display board id
11/01/2018 18
GET
Exercise 1- display board id
11/01/2018 19
GET
Exercise 1- display board id
11/01/2018 20
GET
Exercise 1- display board id
11/01/2018 21
GET
Exercise 2- display cards
11/01/2018 22
GET
Exercise 2- using getBoardId as parameter
11/01/2018 23
GET
Exercise 2- get card id
11/01/2018 24
GET
Exercise 2- get card id
11/01/2018 25
GET
Exercise 2- testing methods
11/01/2018 26
GET
Exercise 3- list display
11/01/2018 27
Endpoint: /boards/boardId/lists
1. Display list method
2. Display list id
3. Test both methods
GET
Summary
11/01/2018 28
1. Reuse of specification
2. Response object/Json mapping
3. Get items id: boards, cards, lists
POST
11/01/2018 29
1. Create new board
2. Create card on new board
3. Create list on new board
POST
Exercise 1 create board
11/01/2018 30
Endpoint: /boards/
1) Handle authentication
2) Add parameter: queryParam(“name”, ”Your
board name”);
POST
Exercise 2 create card
11/01/2018 31
Endpoint: /cards/
1) Handle authentication
2) Add parameter: queryParam(“name”, ”Your
card name”);
3) Add parameter: queryParam(“idList”, “Your
list id); //reuse getId method from
GetRequests class.
POST
Exercise 3 create list
11/01/2018 32
Endpoint: /lists/
1) Handle authentication
2) Use trello documentation to find out what
parameters you need to add new list
https://developers.trello.com/v1.0/reference
POST
Summary
11/01/2018 33
1) Authentication
2) Reuse of get methods
3) Created new board, card list
PUT
Exercises
11/01/2018 34
1) Change card name
2) Move card to other list
3) User trello documentation to get
parameters and endpoints
4) Reuse getId methods where appropriate
PUT
Summary
11/01/2018 35
1) Used documentation of trello.
2) Reused getId methods.
END2END testing
11/01/2018 36
1. Create new board with unique name
2. Create 4 cards on new board
3. Create new list on new board
4. Rename one of the cards
5. Move one of the cards to list Doing
6. Move other card to list Done
7. Move other card to new list
Summary
11/01/2018 37
What we did:
- Covered 7 Endpoints
- GET(Board, Card, List)
- POST(Board, Card, List)
- PUT(Cards)
- Different aspects of authentication
- Using of documentation
- Using network tab
- Response handling
- End 2 end testing with methods reuse.
Summary
11/01/2018 38
What we could do:
- Start flow from post request
- Cast json data to java classes
- Data clean up
- Better structure of project
Summary
11/01/2018 39
What you can do:
- Experiment with examples, enhance those, add
parametrization, add other test cases
- Experiment with other apps
- Jira
- Facebook
- Twitter
- Your company app
- Learn other tools: Postman, SoapUI, JMeter, Gatling
Code with answers available in repo:
https://github.com/szmc/aadays-restassured-workshops
Questions?
11/01/2018 40
Thank you!
11/01/2018 41

More Related Content

PDF
SSIS_Project
PDF
Accounting Module
PDF
TGT#17 - RestApi testing tips and tricks: how to start testing api of your we...
PDF
Acceptance test plan_4-24-07
PPT
Steps to Easier SAS Code Maintenance
PDF
Team a teamapplication_week7_ups
PPTX
Test automation of ap is using postman
PDF
MSSQL Queries.pdf
SSIS_Project
Accounting Module
TGT#17 - RestApi testing tips and tricks: how to start testing api of your we...
Acceptance test plan_4-24-07
Steps to Easier SAS Code Maintenance
Team a teamapplication_week7_ups
Test automation of ap is using postman
MSSQL Queries.pdf

Similar to [TestWarez 2017] Quick start to Rest-assured library: learn how to enhance test automation of web application with fast and reliable test suite (20)

PDF
Play framework
PPT
Rational Publishing Engine and Rational ClearQuest
PDF
18CSL48.pdf
PPT
Plant Name Services Using Tropicos
PDF
ScalaUA - distage: Staged Dependency Injection
PPT
Struts2 course chapter 2: installation and configuration
PDF
Sitecore 7: A developers quest to mastering unit testing
PPTX
Citrix Workspaces HTTP Methods_v1.02.pptx
DOC
PDF
inventory management system
PDF
Inventory management system
DOC
Amali VRF
PPTX
Mobile app master class - Session 2.pptx
PDF
RESTful Day 6
DOC
Actual test case document
PDF
Log Analysis
PDF
Step4 managementsendsorderw
PDF
Practical JavaScript Programming - Session 5/8
PPTX
Modern developer workflow
Play framework
Rational Publishing Engine and Rational ClearQuest
18CSL48.pdf
Plant Name Services Using Tropicos
ScalaUA - distage: Staged Dependency Injection
Struts2 course chapter 2: installation and configuration
Sitecore 7: A developers quest to mastering unit testing
Citrix Workspaces HTTP Methods_v1.02.pptx
inventory management system
Inventory management system
Amali VRF
Mobile app master class - Session 2.pptx
RESTful Day 6
Actual test case document
Log Analysis
Step4 managementsendsorderw
Practical JavaScript Programming - Session 5/8
Modern developer workflow
Ad

More from Stowarzyszenie Jakości Systemów Informatycznych (SJSI) (20)

PPTX
PPTX
PPTX
Miękkie umiejętności w pracy analityka biznesu
PDF
Błędy w analizie z praktyki (nowe wydanie  )
PPTX
7 Skills for highly effective teams - workshop
PDF
Dancing with the devil - how to cooperate with a problematic customer
PDF
Cosmic truths about software requirements
PDF
Analiza prawdziwie biznesowa - skąd biorą się projekty
PPTX
Internet of Things loves data - analysis of Industry 4.0
PDF
Start with Accessibility: Why, How and What
PDF
Analityk i architekt w czasach automatyzacji i robotyzacji biznesu
PDF
Jak sprzedać swój pomysł w 5 minut, czyli pitch deck dla BA
PPTX
PDF
[TestWarez 2017] Skomplikowane testowanie, skomplikowane terminy. Testowanie ...
PPTX
[TestWarez 2017] Przychodzi tester na rozmowę...
PPTX
[TestWarez 2017] A proper gun makes testing fun
PPTX
[TestWarez 2017] Zen testów wydajnościowych
Miękkie umiejętności w pracy analityka biznesu
Błędy w analizie z praktyki (nowe wydanie  )
7 Skills for highly effective teams - workshop
Dancing with the devil - how to cooperate with a problematic customer
Cosmic truths about software requirements
Analiza prawdziwie biznesowa - skąd biorą się projekty
Internet of Things loves data - analysis of Industry 4.0
Start with Accessibility: Why, How and What
Analityk i architekt w czasach automatyzacji i robotyzacji biznesu
Jak sprzedać swój pomysł w 5 minut, czyli pitch deck dla BA
[TestWarez 2017] Skomplikowane testowanie, skomplikowane terminy. Testowanie ...
[TestWarez 2017] Przychodzi tester na rozmowę...
[TestWarez 2017] A proper gun makes testing fun
[TestWarez 2017] Zen testów wydajnościowych
Ad

Recently uploaded (20)

PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PPTX
assetexplorer- product-overview - presentation
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
Designing Intelligence for the Shop Floor.pdf
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
medical staffing services at VALiNTRY
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
Digital Strategies for Manufacturing Companies
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PPTX
L1 - Introduction to python Backend.pptx
PPTX
Introduction to Artificial Intelligence
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PDF
PTS Company Brochure 2025 (1).pdf.......
How to Migrate SBCGlobal Email to Yahoo Easily
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
assetexplorer- product-overview - presentation
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Designing Intelligence for the Shop Floor.pdf
CHAPTER 2 - PM Management and IT Context
medical staffing services at VALiNTRY
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Digital Strategies for Manufacturing Companies
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
2025 Textile ERP Trends: SAP, Odoo & Oracle
L1 - Introduction to python Backend.pptx
Introduction to Artificial Intelligence
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Design an Analysis of Algorithms I-SECS-1021-03
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PTS Company Brochure 2025 (1).pdf.......

[TestWarez 2017] Quick start to Rest-assured library: learn how to enhance test automation of web application with fast and reliable test suite

Editor's Notes

  • #8: Rest assured vs selenium
  • #14: GET is about getting data. DataDriven testing Write those methods so you can reuse those in other excercises.
  • #30: Use methods from GetRequest class!