automated testing with selenium
Post on 22-Jan-2018
358 Views
Preview:
TRANSCRIPT
Automated Testing with Selenium
How Paywall with SSO & Webshop are Tested
Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc
Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc 2
Content
o Selenium intro
o SUT
o How Selenium is used
o Type of Tests
o Future
o Selenium: SW Testing Framework
o SW testing framework for web applications
o Exposes key Elements of Web page
o Selenium WebDriver «drives» Browser
http://www.seleniumhq.org
Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc 3
Selenium – short intro
o Selenium: Chemical Element
o is a chemical element with symbol Se and
atomic number 34
Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc 4
SUT: Project TA-D
Original Goal of Project:
o Sell Digital content of Tages Anzeiger
o Controll access with Paywall
Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc 5
SUT: TA-D - Paywall
AU
TH
PAYWALL
Fro
nte
nds
CMS Webshop
Cli
ents
e- ARCHIV
SSO
PAYWALL
Fro
nte
nds
CMS Webshop
Cli
ents
e-
ARCHIV
Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc 6
SUT: TA-D - Paywall
Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc 7
SUT: TA-D - Paywall
SSO
PAYWALL
Fro
nte
nds
CMS Webshop
Cli
ents
e-
ARCHIV
Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc 8
SUT: TA-D - Paywall
SSO
PAYWALL
Fro
nte
nds
CMS Webshop
Cli
ents
e-
ARCHIV
Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc 9
SUT: TA-D - Webshop
Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc 10
SUT: TA-D - Webshop – Checkout Process
Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc 11
SUT: TA-D - Webshop – Checkout Process
Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc 12
SUT: TA-D - Webshop – Checkout Process
Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc 13
SUT: TA-D - Webshop – Checkout Process
Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc 14
SUT: TA-D - Webshop – Checkout Process
Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc 15
SUT: TA-D
Webshop & Paywall
Key Elements identified
Tests using
Selenium WebDriver
oPaywall Overlays
o Login / My Account
oMenu
oOffers
oCheckout
TA-D WHIP: Project evolved
Webshop
Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc 16
WS expanded from TA to other editions
Paywall
Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc
WHIP: Complexity of Architecture
Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc 18
WHIP: Complexity in Numbers
o 4 Swiss regions
o 15 Independent Webshops
o 22 Newspapers
o Multilanguage
o 5 basic products
o Multiple available periods
o Multiple User Processes
o 10+ Steps in Process
o Steps with multiple options ≈ 600 TCs
≈ 7 – 10 hours
automated regression tests
o 12 departments involved
o 14 core applications
o 21 Native Apps
o Many interfaces, user stories
Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc 19
Selenium: Tests Evolves with WHIP
Paywall Tests:
o No major change of Authentication Tests
o Introduced SSO tests
Webshop Tests:
o Rework of access to Elements
o Workflows for User processes
o Unique Test Case ID
o Data feeds
o Reporting
General:
o Regression Smoke Tests
o Jenkins
Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc 20
Selenium: Rework of access to web pages
Page Objects Pattern
KISS: Modeling webpages using OOP Concepts
Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc 21
Selenium: Rework of access to web pages
Modeling PageObject MyAccountPage
Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc 22
Selenium: Rework of access to web pages
Modeling PageObject MyAccountMenuPage
Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc 23
Selenium: Rework of access to web pages
PageObjects used for testing of Paywall and Webshop
Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc 24
Selenium: Framework for Automated Tests
o Data feeds
o Workflows
o PageObjects
o Reporting
Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc 25
Selenium: Framework for Automated Tests
o Data feeds
o Workflows
o PageObjects
o Reporting
o Static
o Functional
o Integration tests
Implicit & Explicit
Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc 26
Selenium: Framework for Automated Tests
o Data feeds
o Workflows
o PageObjects
o Reporting
o Static
o Functional
o Integration tests
Implicit & Explicit
Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc 27
Selenium: Farmework for Automated Tests
o Data feeds
o Workflows
o PageObjects
o Reporting
o Static
o Functional
o Integration tests
Implicit & Explicit
Client
B
ackend
WHIP: Project evolved 2.
Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc 28
Standalone Webshops Connected into Multi - Webshops
Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc 29
Selenium: Tests Evolves with WHIP, again
No Rework of Tests needed
;)
• Reuse of existing Page Objects
• WS Menu Page Object adopted
• Minimum adoption of Workflows
• New Static Tests added
• Amount of Regression Smoke Tests rises
Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc 30
Selenium: Some Numbers
≈ 60 PageObjects
≈ 320 identified Elements
css xpath
rest id
Element Locators:
Id, cssSelector,
className, xpath,
tagName, linkText
Selenium: Automated tests – Benefits
LEMA Testing : Before
oManual purchases, one by one
o Testers switch between Webshop and
SAP
oVerify SAP data with purchase data
o Purchase in Post processing –
additional steps
oBetween 10 and 15 TC / hour
LEMA Testing : Now
oAutomated purchases over night
(50 – 80 / hour)
oVerification of data in SAP against
reports stored in Excel files
o Purchase in Post processing – tests
are repeated automatically
oBetween 20 and 30 TC / hour
Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc 31
- Reduced effort for manual testing -
- Test Data A La Carte -
100%
Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc 32
Future of AT @ Tamedia ITP
TODO & Plans
oImprovements to existing Framework
oManagement of Test Cases
oTesting iOS and Android native Apps
oCode share among projects
oStandalone Project in JIRA
oUse of test output for integration with
SAP tests - Ranorex
oDeeper testing of Paywall functionalities
Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc 33
Summary
Benefits
Selenium - Automated Testing
SUT
PayWall with SSO
Webshop
Selenium - Intro
Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc 34
Summary / Automated Testing Environment Setup
Selenium WebDriver Page Objects Pattern
Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc 35
Automated Testing
Questions, Ideas, Wishes
tamediatx.slack.com #automatedtesting
Robert Potrc
Tamedia AG, IT Publishing
Application Manager Paywall & Webshop
Automated Software Testing
robert.potrc@tamedia.ch
dnd_robert
top related