+ All Categories
Home > Presentations & Public Speaking > Automated Testing with Selenium

Automated Testing with Selenium

Date post: 22-Jan-2018
Category:
Upload: robert-kaiser
View: 358 times
Download: 3 times
Share this document with a friend
35
Automated Testing with Selenium How Paywall with SSO & Webshop are Tested Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc
Transcript
Page 1: Automated Testing with Selenium

Automated Testing with Selenium

How Paywall with SSO & Webshop are Tested

Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc

Page 2: Automated Testing with Selenium

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

Page 3: Automated Testing with Selenium

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

Page 4: Automated Testing with Selenium

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

Page 5: Automated Testing with Selenium

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

Page 6: Automated Testing with Selenium

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

Page 7: Automated Testing with Selenium

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

Page 8: Automated Testing with Selenium

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

Page 9: Automated Testing with Selenium

Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc 9

SUT: TA-D - Webshop

Page 10: Automated Testing with Selenium

Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc 10

SUT: TA-D - Webshop – Checkout Process

Page 11: Automated Testing with Selenium

Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc 11

SUT: TA-D - Webshop – Checkout Process

Page 12: Automated Testing with Selenium

Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc 12

SUT: TA-D - Webshop – Checkout Process

Page 13: Automated Testing with Selenium

Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc 13

SUT: TA-D - Webshop – Checkout Process

Page 14: Automated Testing with Selenium

Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc 14

SUT: TA-D - Webshop – Checkout Process

Page 15: Automated Testing with Selenium

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

Page 16: Automated Testing with Selenium

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

Page 17: Automated Testing with Selenium

Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc

WHIP: Complexity of Architecture

Page 18: Automated Testing with Selenium

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

Page 19: Automated Testing with Selenium

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

Page 20: Automated Testing with Selenium

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

Page 21: Automated Testing with Selenium

Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc 21

Selenium: Rework of access to web pages

Modeling PageObject MyAccountPage

Page 22: Automated Testing with Selenium

Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc 22

Selenium: Rework of access to web pages

Modeling PageObject MyAccountMenuPage

Page 23: Automated Testing with Selenium

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

Page 24: Automated Testing with Selenium

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

Page 25: Automated Testing with Selenium

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

Page 26: Automated Testing with Selenium

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

Page 27: Automated Testing with Selenium

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

Page 28: Automated Testing with Selenium

WHIP: Project evolved 2.

Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc 28

Standalone Webshops Connected into Multi - Webshops

Page 29: Automated Testing with Selenium

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

Page 30: Automated Testing with Selenium

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

Page 31: Automated Testing with Selenium

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%

Page 32: Automated Testing with Selenium

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

Page 33: Automated Testing with Selenium

Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc 33

Summary

Benefits

Selenium - Automated Testing

SUT

PayWall with SSO

Webshop

Selenium - Intro

Page 34: Automated Testing with Selenium

Tamedia:TX | Automated Testing with Selenium | June 2015 | Robert Potrc 34

Summary / Automated Testing Environment Setup

Selenium WebDriver Page Objects Pattern

Page 35: Automated Testing with Selenium

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

[email protected]

dnd_robert


Recommended