selenium testing on chrome - google devfest armenia 2015
TRANSCRIPT
![Page 1: Selenium Testing on Chrome - Google DevFest Armenia 2015](https://reader033.vdocument.in/reader033/viewer/2022042907/587b5c8b1a28ab38258b4c5f/html5/thumbnails/1.jpg)
Selenium Tes+ng on ChromeSargis Sargsyan
![Page 2: Selenium Testing on Chrome - Google DevFest Armenia 2015](https://reader033.vdocument.in/reader033/viewer/2022042907/587b5c8b1a28ab38258b4c5f/html5/thumbnails/2.jpg)
‹ ›2
Designing The Architecture
4
Introduction
1
Basics of automation
2
Why and how we’ll do it
3
How to design an automation
framework
5
Creating Basic Selenium Test
6
Building Out The Framework
7
Designing framework
for more tests
8
Best Practices and Tips
9
Common Failures
0
Main Topics
![Page 3: Selenium Testing on Chrome - Google DevFest Armenia 2015](https://reader033.vdocument.in/reader033/viewer/2022042907/587b5c8b1a28ab38258b4c5f/html5/thumbnails/3.jpg)
Introduction
`
![Page 4: Selenium Testing on Chrome - Google DevFest Armenia 2015](https://reader033.vdocument.in/reader033/viewer/2022042907/587b5c8b1a28ab38258b4c5f/html5/thumbnails/4.jpg)
‹ ›4
Type Of Automated Testing
Blackbox Automation
Testing
Unit Testing
Integration Testing
![Page 5: Selenium Testing on Chrome - Google DevFest Armenia 2015](https://reader033.vdocument.in/reader033/viewer/2022042907/587b5c8b1a28ab38258b4c5f/html5/thumbnails/5.jpg)
‹ ›5
Unit testing
![Page 6: Selenium Testing on Chrome - Google DevFest Armenia 2015](https://reader033.vdocument.in/reader033/viewer/2022042907/587b5c8b1a28ab38258b4c5f/html5/thumbnails/6.jpg)
‹ ›6
Integration Testing
![Page 7: Selenium Testing on Chrome - Google DevFest Armenia 2015](https://reader033.vdocument.in/reader033/viewer/2022042907/587b5c8b1a28ab38258b4c5f/html5/thumbnails/7.jpg)
‹ ›7
Blackbox Automated Testing (BAT)
INP
UT
OU
TP
UT
![Page 8: Selenium Testing on Chrome - Google DevFest Armenia 2015](https://reader033.vdocument.in/reader033/viewer/2022042907/587b5c8b1a28ab38258b4c5f/html5/thumbnails/8.jpg)
‹ ›8
Why Do Blackbox Testing?
Ĥ
Leverage
y
Regression
`
Absolute Requirements
![Page 9: Selenium Testing on Chrome - Google DevFest Armenia 2015](https://reader033.vdocument.in/reader033/viewer/2022042907/587b5c8b1a28ab38258b4c5f/html5/thumbnails/9.jpg)
‹ ›9
Pyramid of the Testing
Integra(on Tests
Unit Test
BAT Tests
Intern
al Qu
alityE
xtern
al Qu
ality Exe
cutio
n T
ime
Total C
ost o
f Ow
ne
rship
![Page 10: Selenium Testing on Chrome - Google DevFest Armenia 2015](https://reader033.vdocument.in/reader033/viewer/2022042907/587b5c8b1a28ab38258b4c5f/html5/thumbnails/10.jpg)
Selenium
p
![Page 11: Selenium Testing on Chrome - Google DevFest Armenia 2015](https://reader033.vdocument.in/reader033/viewer/2022042907/587b5c8b1a28ab38258b4c5f/html5/thumbnails/11.jpg)
‹ ›11
A Bit of History
Jason Huggins creates a JavaScript based tool for automatic testing called Selenium (now it is known as Selenium Core). Later Selenium Remote Control (aka Selenium RC) was developed
Simon Stewart started working on another web testing tool called WebDriver
Selenium RC and WebDriver are merged into a one project called S e l e n i u m -W e b D r i v e r ( a k a Selenium 2.0)
The first working draft of W e b D r i v e r A P I W 3 C Specification is released
Selenium Grid is released
2012
7
2004
q
2013
1
2009
Z2006
a
![Page 12: Selenium Testing on Chrome - Google DevFest Armenia 2015](https://reader033.vdocument.in/reader033/viewer/2022042907/587b5c8b1a28ab38258b4c5f/html5/thumbnails/12.jpg)
‹ ›12
What is Selenium?It is an open-source project!
1.Windows
2.Mac
3.Linux
Selenium is a web application testing framework that allows you to write tests in many programming languages
Selenium deploys on
![Page 13: Selenium Testing on Chrome - Google DevFest Armenia 2015](https://reader033.vdocument.in/reader033/viewer/2022042907/587b5c8b1a28ab38258b4c5f/html5/thumbnails/13.jpg)
‹ ›13
Supported Main Browsers
WW WWW
![Page 14: Selenium Testing on Chrome - Google DevFest Armenia 2015](https://reader033.vdocument.in/reader033/viewer/2022042907/587b5c8b1a28ab38258b4c5f/html5/thumbnails/14.jpg)
‹ ›14
Terminology
Selenium Core
Selenium RC Selenium WebDriver
Selenium Server
Selenium IDE
Selenium-Grid
![Page 15: Selenium Testing on Chrome - Google DevFest Armenia 2015](https://reader033.vdocument.in/reader033/viewer/2022042907/587b5c8b1a28ab38258b4c5f/html5/thumbnails/15.jpg)
Architecture
`
![Page 16: Selenium Testing on Chrome - Google DevFest Armenia 2015](https://reader033.vdocument.in/reader033/viewer/2022042907/587b5c8b1a28ab38258b4c5f/html5/thumbnails/16.jpg)
‹ ›16
Architecture
FrameworkL
Chrome Browser (Web App)
Ħ
Selenium Tests X
Selenium Web Driver
Ä
![Page 17: Selenium Testing on Chrome - Google DevFest Armenia 2015](https://reader033.vdocument.in/reader033/viewer/2022042907/587b5c8b1a28ab38258b4c5f/html5/thumbnails/17.jpg)
Setup
V
![Page 18: Selenium Testing on Chrome - Google DevFest Armenia 2015](https://reader033.vdocument.in/reader033/viewer/2022042907/587b5c8b1a28ab38258b4c5f/html5/thumbnails/18.jpg)
‹ ›18
Download Selenium Library
![Page 19: Selenium Testing on Chrome - Google DevFest Armenia 2015](https://reader033.vdocument.in/reader033/viewer/2022042907/587b5c8b1a28ab38258b4c5f/html5/thumbnails/19.jpg)
‹ ›19
Download Chrome WebDriver
![Page 20: Selenium Testing on Chrome - Google DevFest Armenia 2015](https://reader033.vdocument.in/reader033/viewer/2022042907/587b5c8b1a28ab38258b4c5f/html5/thumbnails/20.jpg)
‹ ›20
Add Library to Project Structure
![Page 21: Selenium Testing on Chrome - Google DevFest Armenia 2015](https://reader033.vdocument.in/reader033/viewer/2022042907/587b5c8b1a28ab38258b4c5f/html5/thumbnails/21.jpg)
‹ ›21
Setup Chrome WebDriver
![Page 22: Selenium Testing on Chrome - Google DevFest Armenia 2015](https://reader033.vdocument.in/reader033/viewer/2022042907/587b5c8b1a28ab38258b4c5f/html5/thumbnails/22.jpg)
‹ ›22
Create Base Class
![Page 23: Selenium Testing on Chrome - Google DevFest Armenia 2015](https://reader033.vdocument.in/reader033/viewer/2022042907/587b5c8b1a28ab38258b4c5f/html5/thumbnails/23.jpg)
‹ ›23
Create Page for Google
![Page 24: Selenium Testing on Chrome - Google DevFest Armenia 2015](https://reader033.vdocument.in/reader033/viewer/2022042907/587b5c8b1a28ab38258b4c5f/html5/thumbnails/24.jpg)
‹ ›24
Create a Test to Check Search in Google
![Page 25: Selenium Testing on Chrome - Google DevFest Armenia 2015](https://reader033.vdocument.in/reader033/viewer/2022042907/587b5c8b1a28ab38258b4c5f/html5/thumbnails/25.jpg)
‹ ›25
Let’s Run the Test
![Page 26: Selenium Testing on Chrome - Google DevFest Armenia 2015](https://reader033.vdocument.in/reader033/viewer/2022042907/587b5c8b1a28ab38258b4c5f/html5/thumbnails/26.jpg)
WebDriver Features
Z
![Page 27: Selenium Testing on Chrome - Google DevFest Armenia 2015](https://reader033.vdocument.in/reader033/viewer/2022042907/587b5c8b1a28ab38258b4c5f/html5/thumbnails/27.jpg)
‹ ›27
Drag and Drop
![Page 28: Selenium Testing on Chrome - Google DevFest Armenia 2015](https://reader033.vdocument.in/reader033/viewer/2022042907/587b5c8b1a28ab38258b4c5f/html5/thumbnails/28.jpg)
‹ ›28
Maximize the Window
![Page 29: Selenium Testing on Chrome - Google DevFest Armenia 2015](https://reader033.vdocument.in/reader033/viewer/2022042907/587b5c8b1a28ab38258b4c5f/html5/thumbnails/29.jpg)
‹ ›29
JavaScript
![Page 30: Selenium Testing on Chrome - Google DevFest Armenia 2015](https://reader033.vdocument.in/reader033/viewer/2022042907/587b5c8b1a28ab38258b4c5f/html5/thumbnails/30.jpg)
‹ ›30
Scroll a WindowIt is possible to use Javascript election abilities
![Page 31: Selenium Testing on Chrome - Google DevFest Armenia 2015](https://reader033.vdocument.in/reader033/viewer/2022042907/587b5c8b1a28ab38258b4c5f/html5/thumbnails/31.jpg)
‹ ›31
Other Features
1 WebDriver can take a Screenshot
2 You can start the browser with an extension installed
3 Proxy configuration
![Page 32: Selenium Testing on Chrome - Google DevFest Armenia 2015](https://reader033.vdocument.in/reader033/viewer/2022042907/587b5c8b1a28ab38258b4c5f/html5/thumbnails/32.jpg)
Common Failures
l
![Page 33: Selenium Testing on Chrome - Google DevFest Armenia 2015](https://reader033.vdocument.in/reader033/viewer/2022042907/587b5c8b1a28ab38258b4c5f/html5/thumbnails/33.jpg)
‹ ›33
Recorded Brittle Test
![Page 34: Selenium Testing on Chrome - Google DevFest Armenia 2015](https://reader033.vdocument.in/reader033/viewer/2022042907/587b5c8b1a28ab38258b4c5f/html5/thumbnails/34.jpg)
‹ ›34
Not Building a Framework
![Page 35: Selenium Testing on Chrome - Google DevFest Armenia 2015](https://reader033.vdocument.in/reader033/viewer/2022042907/587b5c8b1a28ab38258b4c5f/html5/thumbnails/35.jpg)
‹ ›35
Writing Tests Like Code
![Page 36: Selenium Testing on Chrome - Google DevFest Armenia 2015](https://reader033.vdocument.in/reader033/viewer/2022042907/587b5c8b1a28ab38258b4c5f/html5/thumbnails/36.jpg)
‹ ›36
Trying to Automate Hard Things
![Page 37: Selenium Testing on Chrome - Google DevFest Armenia 2015](https://reader033.vdocument.in/reader033/viewer/2022042907/587b5c8b1a28ab38258b4c5f/html5/thumbnails/37.jpg)
‹ ›37
Error vs. Failure
Something other than what was being tested failed
The condition tested was not met
The framework threw an exception
An Assertion in the test failed
Test fail becauseTest error because
![Page 38: Selenium Testing on Chrome - Google DevFest Armenia 2015](https://reader033.vdocument.in/reader033/viewer/2022042907/587b5c8b1a28ab38258b4c5f/html5/thumbnails/38.jpg)
‹ ›38
Continuous Integration
1 Have a plan and stick to it
2 Run test as part of build
3 Run test locally
4 Report results
5 Break builds