SlideShare a Scribd company logo
1 of 60
Download to read offline
Make	Your	Selenium	Suite	Faster	and	Reliable:
Test	Setup	with	REST	APIs
Sargis Sargsyan
s How	to	design	the	framework	to	be	able	to	use	HTTP	
requests
q How	to	create	Test	Data	before	test	and	clean	up	after	
test	without	UI	actions w How	to	store	login	create/edit/delete	objects	without	UI	
actions
Best	practices	of	Selenium	WebDriverhPractical	example	how	to	use	HTTP	lib	from	the	Java	
code7
Maintaining	HTTP	responsesÖ
Main	Topics
What	is	Test	Setup?	Why	is	it	Important?
[ A	single	Selenium	test	should	test	one	and	only	thing.	A	bug	
in	another	part	of	the	application	that	is	not	exactly	related	
to	the	test	should	not	cause	the	test	to	fail.
L Every	test	should	be	independent.	The	test	outcome	should	
not	affected	by	another	test	in	the	suite.
Make	a	faster	tests.	As	quicker	test	suite	as	much	useful	it	is.s
n Every	test	should	create	and	clean	the	data	before	and	the	
after	the	test	run.
Test Case Life	Cycle
y
Test	clean	up
S
Run	the	test
Test	initialize
Why	should	 test	data	be	created	before	test	execution?
Ĥ
E
7
a
Selenium	tests	often	
involve	setups.	Only	after	
doing	those	things	you	
are	ready	to	assert	on	
some	aspect	of	the	
website
Sign	Up	/	Login
Submissions
Pages	
Navigation
Interactions	/	
Actions
å Test	Run
Tools &
libraries
7
Java
Maven
TestNG
OkHttp
Gson
Selenium
Source Code
https://github.com/sargissargsyan/selenium-setup-rest-api
Taiga.io
Getting Started with
Selenium
s
Let’s	Test	Like	and	Watching	Buttons
Let’s	Test	Like	and	Watching	Buttons
Let’s	Test	Like	and	Watching	Buttons
Let’s	Test	Like	and	Watching	Buttons
Let’s	Test	Like	and	Watching	Buttons
Let’s	Test	Like	and	Watching	Buttons
Let’s	Test	Like	and	Watching	Buttons
Let’s	Test	Like	and	Watching	Buttons
Let’s	Test	Like	and	Watching	Buttons
Let’s	Test	Like	and	Watching	Buttons
Let’s	Test	Like	and	Watching	Buttons
Login
á
What’s	Happening	 When	You	Click	on	Login?
What’s	Happening	 When	You	Click	on	Login?
What’s	Happening	 When	You	Click	on	Login?
What’s	Happening	 When	You	Click	on	Login?
What’s	Happening	 When	You	Click	on	Login?
What’s	Happening	 When	You	Click	on	Login?
What’s	Happening	 When	You	Click	on	Login?
What’s	Happening	 When	You	Click	on	Login?
What’s	Happening	 When	You	Click	on	Login?
Create Project
`
How	to	Create	Project
How	to	Create	Project
How	to	Create	Project
How	to	Create	Project
How	to	Create	Project
Integrate	with	Page	Object	Patten
The	Same	Test	with	Rest	API	setup
The	Test	Run	with	Rest	API	setup
Test	Run	Time
Create	Issue	in	Project	with	API
Clean up after
y
Delete	Created	Project
Delete	Created	Project
Tips and Tricks
Ĥ
Login	Info	in	Cookies
Manage	Cookies
Download	Selenium	Drivers	with	Maven	plugin
Execute	JavaScript	to	Click	on	Element
Wait	for	Page	Load
57
Take	a	Screenshot	on	Failure
58
Get	HTML	Source
59
Maximize	the	Window
Thank You!
Have a Nice	Day...
Ö
sargis.sargsyan@live.com
ą
/sargissargsyan
t
@sargisqa

More Related Content

What's hot

Selenium 2: The Future of Selenium is now!
Selenium 2: The Future of Selenium is now!Selenium 2: The Future of Selenium is now!
Selenium 2: The Future of Selenium is now!
AutomatedTester
 
Continuous Integration (Jenkins/Hudson)
Continuous Integration (Jenkins/Hudson)Continuous Integration (Jenkins/Hudson)
Continuous Integration (Jenkins/Hudson)
Dennys Hsieh
 
Docker and Selenoid - Make Autotests Great Again
Docker and Selenoid - Make Autotests Great Again Docker and Selenoid - Make Autotests Great Again
Docker and Selenoid - Make Autotests Great Again
COMAQA.BY
 
Selenium (1)
Selenium (1)Selenium (1)
Selenium (1)
onlinemindq
 
Presentation_Protractor
Presentation_ProtractorPresentation_Protractor
Presentation_Protractor
Umesh Randhe
 

What's hot (20)

Selenium
SeleniumSelenium
Selenium
 
Selenium Automation at Incapsula
Selenium Automation at IncapsulaSelenium Automation at Incapsula
Selenium Automation at Incapsula
 
How to work with Selenium Grid: a quick walkthrough
How to work with Selenium Grid: a quick walkthroughHow to work with Selenium Grid: a quick walkthrough
How to work with Selenium Grid: a quick walkthrough
 
Extreme Testing with Selenium - @hugs at Jenkins User Conference 2011
Extreme Testing with Selenium - @hugs at Jenkins User Conference 2011Extreme Testing with Selenium - @hugs at Jenkins User Conference 2011
Extreme Testing with Selenium - @hugs at Jenkins User Conference 2011
 
Continuous Delivery With Selenium Grid And Docker
Continuous Delivery With Selenium Grid And DockerContinuous Delivery With Selenium Grid And Docker
Continuous Delivery With Selenium Grid And Docker
 
Let’s start Continuous Integration with jenkins
Let’s start Continuous Integration with jenkinsLet’s start Continuous Integration with jenkins
Let’s start Continuous Integration with jenkins
 
Selenium 2: The Future of Selenium is now!
Selenium 2: The Future of Selenium is now!Selenium 2: The Future of Selenium is now!
Selenium 2: The Future of Selenium is now!
 
Continuous Integration (Jenkins/Hudson)
Continuous Integration (Jenkins/Hudson)Continuous Integration (Jenkins/Hudson)
Continuous Integration (Jenkins/Hudson)
 
Docker and Selenoid - Make Autotests Great Again
Docker and Selenoid - Make Autotests Great Again Docker and Selenoid - Make Autotests Great Again
Docker and Selenoid - Make Autotests Great Again
 
Be flexible with zalenium, a dockerized selenium grid infrastructure
Be flexible with zalenium, a dockerized selenium grid infrastructureBe flexible with zalenium, a dockerized selenium grid infrastructure
Be flexible with zalenium, a dockerized selenium grid infrastructure
 
Selenium (1)
Selenium (1)Selenium (1)
Selenium (1)
 
Testing world selenium_start_chapter1 (1)
Testing world selenium_start_chapter1 (1)Testing world selenium_start_chapter1 (1)
Testing world selenium_start_chapter1 (1)
 
Selenoid: browsers in containers
Selenoid: browsers in containersSelenoid: browsers in containers
Selenoid: browsers in containers
 
How Atlassian's Build Engineering Team Has Scaled to 150k Builds Per Month an...
How Atlassian's Build Engineering Team Has Scaled to 150k Builds Per Month an...How Atlassian's Build Engineering Team Has Scaled to 150k Builds Per Month an...
How Atlassian's Build Engineering Team Has Scaled to 150k Builds Per Month an...
 
Kloud
KloudKloud
Kloud
 
QA Fest 2017. Александр Хотемской. Современные возможности в организации Prot...
QA Fest 2017. Александр Хотемской. Современные возможности в организации Prot...QA Fest 2017. Александр Хотемской. Современные возможности в организации Prot...
QA Fest 2017. Александр Хотемской. Современные возможности в организации Prot...
 
Automated Infrastructure Testing
Automated Infrastructure TestingAutomated Infrastructure Testing
Automated Infrastructure Testing
 
Using Selenium 3 0
Using Selenium 3 0Using Selenium 3 0
Using Selenium 3 0
 
How to Install and Configure Jenkins on Centos 7
How to Install and Configure Jenkins on Centos 7How to Install and Configure Jenkins on Centos 7
How to Install and Configure Jenkins on Centos 7
 
Presentation_Protractor
Presentation_ProtractorPresentation_Protractor
Presentation_Protractor
 

Similar to Make Your Selenium Suite Faster and Reliable: Test Setup with REST APIs - SQA Days 23, Minsk, Belarus

Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
Simplilearn
 
RAJESH KHANNA QA Engineer
RAJESH KHANNA QA EngineerRAJESH KHANNA QA Engineer
RAJESH KHANNA QA Engineer
Rajesh khanna
 
Sakai10 Selenium Workshop
Sakai10 Selenium WorkshopSakai10 Selenium Workshop
Sakai10 Selenium Workshop
coreyjack
 
What is Selenium Testing.pdf
What is Selenium Testing.pdfWhat is Selenium Testing.pdf
What is Selenium Testing.pdf
AnanthReddy38
 

Similar to Make Your Selenium Suite Faster and Reliable: Test Setup with REST APIs - SQA Days 23, Minsk, Belarus (20)

Selenium Best Practices For Web Testing
Selenium Best Practices For Web TestingSelenium Best Practices For Web Testing
Selenium Best Practices For Web Testing
 
Selenium training in chennai
Selenium training in chennaiSelenium training in chennai
Selenium training in chennai
 
Selenium
SeleniumSelenium
Selenium
 
What is Selenium Introduction to Selenium Testing.pptx
What is Selenium Introduction to Selenium Testing.pptxWhat is Selenium Introduction to Selenium Testing.pptx
What is Selenium Introduction to Selenium Testing.pptx
 
Lesson_06_Software_and_Automation_Testing_Frameworks.pdf
Lesson_06_Software_and_Automation_Testing_Frameworks.pdfLesson_06_Software_and_Automation_Testing_Frameworks.pdf
Lesson_06_Software_and_Automation_Testing_Frameworks.pdf
 
Test Framework for Acne Selenium+Sahi
Test Framework for Acne Selenium+SahiTest Framework for Acne Selenium+Sahi
Test Framework for Acne Selenium+Sahi
 
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
 
Selenium course training institute ameerpet hyderabad
Selenium course training institute ameerpet hyderabad Selenium course training institute ameerpet hyderabad
Selenium course training institute ameerpet hyderabad
 
Selenium course training institute ameerpet hyderabad – Best software trainin...
Selenium course training institute ameerpet hyderabad – Best software trainin...Selenium course training institute ameerpet hyderabad – Best software trainin...
Selenium course training institute ameerpet hyderabad – Best software trainin...
 
Introduction to Selenium Testing
Introduction to Selenium TestingIntroduction to Selenium Testing
Introduction to Selenium Testing
 
Selenium ui paradigm - DDD North 2
Selenium ui paradigm - DDD North 2Selenium ui paradigm - DDD North 2
Selenium ui paradigm - DDD North 2
 
RAJESH KHANNA QA Engineer
RAJESH KHANNA QA EngineerRAJESH KHANNA QA Engineer
RAJESH KHANNA QA Engineer
 
selenium
selenium selenium
selenium
 
white and grey modern website application education project group school pres...
white and grey modern website application education project group school pres...white and grey modern website application education project group school pres...
white and grey modern website application education project group school pres...
 
Sakai10 Selenium Workshop
Sakai10 Selenium WorkshopSakai10 Selenium Workshop
Sakai10 Selenium Workshop
 
What is Selenium Testing.pdf
What is Selenium Testing.pdfWhat is Selenium Testing.pdf
What is Selenium Testing.pdf
 
Automated Testing for Websites With Selenium IDE
Automated Testing for Websites With Selenium IDEAutomated Testing for Websites With Selenium IDE
Automated Testing for Websites With Selenium IDE
 
Best java automation training institute in Bangalore - Selenium Labs
Best java automation training institute in Bangalore - Selenium Labs Best java automation training institute in Bangalore - Selenium Labs
Best java automation training institute in Bangalore - Selenium Labs
 
QAorHighway2016
QAorHighway2016QAorHighway2016
QAorHighway2016
 
Training on Test Automation Uses Selenium | 21&28 March 2015 | Karachi, Pakistan
Training on Test Automation Uses Selenium | 21&28 March 2015 | Karachi, PakistanTraining on Test Automation Uses Selenium | 21&28 March 2015 | Karachi, Pakistan
Training on Test Automation Uses Selenium | 21&28 March 2015 | Karachi, Pakistan
 

More from Sargis Sargsyan

More from Sargis Sargsyan (11)

Let’s Talk About Quality Engineering
Let’s Talk About Quality EngineeringLet’s Talk About Quality Engineering
Let’s Talk About Quality Engineering
 
Your Road to Quality Assurance
Your Road to Quality AssuranceYour Road to Quality Assurance
Your Road to Quality Assurance
 
Appium Dockerization: from Scratch to Advanced Implementation - HUSTEF 2019
Appium Dockerization: from Scratch to Advanced Implementation - HUSTEF 2019Appium Dockerization: from Scratch to Advanced Implementation - HUSTEF 2019
Appium Dockerization: from Scratch to Advanced Implementation - HUSTEF 2019
 
Run your Appium tests using Docker Android - AppiumConf 2019
Run your Appium tests using Docker Android - AppiumConf 2019Run your Appium tests using Docker Android - AppiumConf 2019
Run your Appium tests using Docker Android - AppiumConf 2019
 
Test Data Preparation: Tips and Tricks - SQA Days 22 - Saint Petersburg
Test Data Preparation: Tips and Tricks - SQA Days 22 - Saint PetersburgTest Data Preparation: Tips and Tricks - SQA Days 22 - Saint Petersburg
Test Data Preparation: Tips and Tricks - SQA Days 22 - Saint Petersburg
 
Better Page Object Handling with Loadable Component Pattern - SQA Days 20, Be...
Better Page Object Handling with Loadable Component Pattern - SQA Days 20, Be...Better Page Object Handling with Loadable Component Pattern - SQA Days 20, Be...
Better Page Object Handling with Loadable Component Pattern - SQA Days 20, Be...
 
Better Page Object Handling with Loadable Component Pattern
Better Page Object Handling with Loadable Component PatternBetter Page Object Handling with Loadable Component Pattern
Better Page Object Handling with Loadable Component Pattern
 
Agile Testing
Agile TestingAgile Testing
Agile Testing
 
Selenium Testing on Chrome - Google DevFest Armenia 2015
Selenium Testing on Chrome - Google DevFest Armenia 2015Selenium Testing on Chrome - Google DevFest Armenia 2015
Selenium Testing on Chrome - Google DevFest Armenia 2015
 
Web Application Testing with Selenium
Web Application Testing with Selenium Web Application Testing with Selenium
Web Application Testing with Selenium
 
QA MeetUp Yerevan - Aug 25
QA MeetUp Yerevan - Aug 25QA MeetUp Yerevan - Aug 25
QA MeetUp Yerevan - Aug 25
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
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
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
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
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
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
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 

Make Your Selenium Suite Faster and Reliable: Test Setup with REST APIs - SQA Days 23, Minsk, Belarus