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 Potrc2
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 Potrc3
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 Potrc4
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 Potrc5
SUT: TA-D - Paywall
AUTH
PAYWALL
Frontends
CMSWebshop
Clients
e-ARCHIV
SSO
PAYWALL
Frontends
CMSWebshop
Clients
e-
ARCHIV
Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc6
SUT: TA-D - Paywall
Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc7
SUT: TA-D - Paywall
SSO
PAYWALL
Frontends
CMSWebshop
Clients
e-
ARCHIV
Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc8
SUT: TA-D - Paywall
SSO
PAYWALL
Frontends
CMSWebshop
Clients
e-
ARCHIV
Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc9
SUT: TA-D - Webshop
Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc10
SUT: TA-D - Webshop – Checkout Process
Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc11
SUT: TA-D - Webshop – Checkout Process
Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc12
SUT: TA-D - Webshop – Checkout Process
Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc13
SUT: TA-D - Webshop – Checkout Process
Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc14
SUT: TA-D - Webshop – Checkout Process
Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc15
SUT: TA-D
Webshop & Paywall
Key Elements identified
Tests using
Selenium WebDriver
o Paywall Overlays
o Login / My Account
o Menu
o Offers
o Checkout
TA-D  WHIP: Project evolved
Webshop
Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc16
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 Potrc18
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 Potrc19
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 Potrc20
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 Potrc21
Selenium: Rework of access to web pages
Modeling PageObject MyAccountPage
Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc22
Selenium: Rework of access to web pages
Modeling PageObject MyAccountMenuPage
Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc23
Selenium: Rework of access to web pages
PageObjects used for testing of Paywall and Webshop
Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc24
Selenium: Framework for Automated Tests
o Data feeds
o Workflows
o PageObjects
o Reporting
Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc25
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 Potrc26
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 Potrc27
Selenium: Farmework for Automated Tests
o Data feeds
o Workflows
o PageObjects
o Reporting
o Static
o Functional
o Integration tests
Implicit & Explicit
Client
Backend
WHIP: Project evolved 2.
Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc28
Standalone Webshops  Connected into Multi - Webshops
Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc29
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 Potrc30
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
o Manual purchases, one by one
o Testers switch between Webshop and
SAP
o Verify SAP data with purchase data
o Purchase in Post processing –
additional steps
o Between 10 and 15 TC / hour
LEMA Testing : Now
o Automated purchases over night
(50 – 80 / hour)
o Verification of data in SAP against
reports stored in Excel files
o Purchase in Post processing – tests
are repeated automatically
o Between 20 and 30 TC / hour
Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc31
- Reduced effort for manual testing -
- Test Data A La Carte -
100%
Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc32
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 Potrc33
Summary
 Benefits
 Selenium - Automated Testing
 SUT
 PayWall with SSO
 Webshop
 Selenium - Intro
Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc34
Summary / Automated Testing Environment Setup
Selenium WebDriver
Page Objects Pattern
Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc35
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

Automated Testing with Selenium

  • 1.
    Automated Testing withSelenium How Paywall with SSO & Webshop are Tested Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc
  • 2.
    Tamedia:TX | AutomatedTesting with Selenium | June 2015 | Robert Potrc2 Content o Selenium intro o SUT o How Selenium is used o Type of Tests o Future
  • 3.
    o Selenium: SWTesting 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 Potrc3 Selenium – short intro o Selenium: Chemical Element o is a chemical element with symbol Se and atomic number 34
  • 4.
    Tamedia:TX | AutomatedTesting with Selenium | June 2015 | Robert Potrc4 SUT: Project TA-D Original Goal of Project: o Sell Digital content of Tages Anzeiger o Controll access with Paywall
  • 5.
    Tamedia:TX | AutomatedTesting with Selenium | June 2015 | Robert Potrc5 SUT: TA-D - Paywall AUTH PAYWALL Frontends CMSWebshop Clients e-ARCHIV
  • 6.
    SSO PAYWALL Frontends CMSWebshop Clients e- ARCHIV Tamedia:TX | AutomatedTesting with Selenium | June 2015 | Robert Potrc6 SUT: TA-D - Paywall
  • 7.
    Tamedia:TX | AutomatedTesting with Selenium | June 2015 | Robert Potrc7 SUT: TA-D - Paywall SSO PAYWALL Frontends CMSWebshop Clients e- ARCHIV
  • 8.
    Tamedia:TX | AutomatedTesting with Selenium | June 2015 | Robert Potrc8 SUT: TA-D - Paywall SSO PAYWALL Frontends CMSWebshop Clients e- ARCHIV
  • 9.
    Tamedia:TX | AutomatedTesting with Selenium | June 2015 | Robert Potrc9 SUT: TA-D - Webshop
  • 10.
    Tamedia:TX | AutomatedTesting with Selenium | June 2015 | Robert Potrc10 SUT: TA-D - Webshop – Checkout Process
  • 11.
    Tamedia:TX | AutomatedTesting with Selenium | June 2015 | Robert Potrc11 SUT: TA-D - Webshop – Checkout Process
  • 12.
    Tamedia:TX | AutomatedTesting with Selenium | June 2015 | Robert Potrc12 SUT: TA-D - Webshop – Checkout Process
  • 13.
    Tamedia:TX | AutomatedTesting with Selenium | June 2015 | Robert Potrc13 SUT: TA-D - Webshop – Checkout Process
  • 14.
    Tamedia:TX | AutomatedTesting with Selenium | June 2015 | Robert Potrc14 SUT: TA-D - Webshop – Checkout Process
  • 15.
    Tamedia:TX | AutomatedTesting with Selenium | June 2015 | Robert Potrc15 SUT: TA-D Webshop & Paywall Key Elements identified Tests using Selenium WebDriver o Paywall Overlays o Login / My Account o Menu o Offers o Checkout
  • 16.
    TA-D  WHIP:Project evolved Webshop Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc16 WS expanded from TA to other editions Paywall
  • 17.
    Tamedia:TX | AutomatedTesting with Selenium | June 2015 | Robert Potrc WHIP: Complexity of Architecture
  • 18.
    Tamedia:TX | AutomatedTesting with Selenium | June 2015 | Robert Potrc18 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
  • 19.
    Tamedia:TX | AutomatedTesting with Selenium | June 2015 | Robert Potrc19 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
  • 20.
    Tamedia:TX | AutomatedTesting with Selenium | June 2015 | Robert Potrc20 Selenium: Rework of access to web pages Page Objects Pattern KISS: Modeling webpages using OOP Concepts
  • 21.
    Tamedia:TX | AutomatedTesting with Selenium | June 2015 | Robert Potrc21 Selenium: Rework of access to web pages Modeling PageObject MyAccountPage
  • 22.
    Tamedia:TX | AutomatedTesting with Selenium | June 2015 | Robert Potrc22 Selenium: Rework of access to web pages Modeling PageObject MyAccountMenuPage
  • 23.
    Tamedia:TX | AutomatedTesting with Selenium | June 2015 | Robert Potrc23 Selenium: Rework of access to web pages PageObjects used for testing of Paywall and Webshop
  • 24.
    Tamedia:TX | AutomatedTesting with Selenium | June 2015 | Robert Potrc24 Selenium: Framework for Automated Tests o Data feeds o Workflows o PageObjects o Reporting
  • 25.
    Tamedia:TX | AutomatedTesting with Selenium | June 2015 | Robert Potrc25 Selenium: Framework for Automated Tests o Data feeds o Workflows o PageObjects o Reporting o Static o Functional o Integration tests Implicit & Explicit
  • 26.
    Tamedia:TX | AutomatedTesting with Selenium | June 2015 | Robert Potrc26 Selenium: Framework for Automated Tests o Data feeds o Workflows o PageObjects o Reporting o Static o Functional o Integration tests Implicit & Explicit
  • 27.
    Tamedia:TX | AutomatedTesting with Selenium | June 2015 | Robert Potrc27 Selenium: Farmework for Automated Tests o Data feeds o Workflows o PageObjects o Reporting o Static o Functional o Integration tests Implicit & Explicit Client Backend
  • 28.
    WHIP: Project evolved2. Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc28 Standalone Webshops  Connected into Multi - Webshops
  • 29.
    Tamedia:TX | AutomatedTesting with Selenium | June 2015 | Robert Potrc29 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
  • 30.
    Tamedia:TX | AutomatedTesting with Selenium | June 2015 | Robert Potrc30 Selenium: Some Numbers ≈ 60 PageObjects ≈ 320 identified Elements css xpath rest id Element Locators: Id, cssSelector, className, xpath, tagName, linkText
  • 31.
    Selenium: Automated tests– Benefits LEMA Testing : Before o Manual purchases, one by one o Testers switch between Webshop and SAP o Verify SAP data with purchase data o Purchase in Post processing – additional steps o Between 10 and 15 TC / hour LEMA Testing : Now o Automated purchases over night (50 – 80 / hour) o Verification of data in SAP against reports stored in Excel files o Purchase in Post processing – tests are repeated automatically o Between 20 and 30 TC / hour Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc31 - Reduced effort for manual testing - - Test Data A La Carte - 100%
  • 32.
    Tamedia:TX | AutomatedTesting with Selenium | June 2015 | Robert Potrc32 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
  • 33.
    Tamedia:TX | AutomatedTesting with Selenium | June 2015 | Robert Potrc33 Summary  Benefits  Selenium - Automated Testing  SUT  PayWall with SSO  Webshop  Selenium - Intro
  • 34.
    Tamedia:TX | AutomatedTesting with Selenium | June 2015 | Robert Potrc34 Summary / Automated Testing Environment Setup Selenium WebDriver Page Objects Pattern
  • 35.
    Tamedia:TX | AutomatedTesting with Selenium | June 2015 | Robert Potrc35 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