SlideShare ist ein Scribd-Unternehmen logo
1 von 40
An easy way to
automate complex UI
Test automation practices and tips
About me
 7+ years in IT
 Automation Engineer
 Scrum Master
 Betsson project, Ciklum

What we have
 Payments Solution for online casino
 20+ brands
 7+ countries
 40+ payment methods
 Payment Pages UI (Desktop, mobile, adaptive)
 Brand specific features
Complex UI?*
*from automation perspective
Complex UI?
 Complex fronted:
 Dynamic
 Async
 Adaptive
 Complex backend:
 Hardly configurable
 Overflown
 Slow
 Unstable
Complex tests
 Complex behavior
 Complex architecture
 Slow
 Fragile
 Overflown with scenario's
 «Test smells» *
 *http://xunitpatterns.com/TestSmells.html
What automation we want?
 Easy to write
 Clear to understand
 Simple to work with
Agenda
 Fakes & test doubles
 Test & Patterns
 Tips and tricks (test sugar & screenshots)
Fakes & test doubles
Test doubles
 We replace a component on which the SUT
depends with a "test-specific equivalent.“
 Test Stub
 Mock Object
 Fake Object
Test doubles
 Web part
 WebApi
 Core System
 DB
 3rd systems
Test doubles
 Web part
 WebApi / Fake
 Core System
 DB
 3rd systems
What can we solve with Fake
 Test without dependent components
 … without Backend
 … without 3rd Party services
 … without DB
 Test unavailable component
 Simplify scenarios precondition
 Fix Slow/ Fragile / Heavyweight tests
Static Fake
 Static Fake – hardcoded behavior of dependent
component.
Static Fake. Pros
 Have all specific behaviors
 Any language for implementation*
 Use for prototyping & local testing
 Speedup tests
 *Sometimes it very hard to mock backend on JavaScript
Static Fake. Cons
 It is not easy to implement
 Test scenarios are not clear
 Support
Dynamic Fake
 Configurable Fake Object - a reusable Test Double with the
configurable values to be returned or verified during the
fixture setup phase of a test.
Dynamic Fake. Pros
 Have all specific behaviors
 Configured from test
 Scenarios are clear & readable
Dynamic Fake. Cons
 Much harder for development
 Can’t/hard to used for prototyping or local testing
Pitfalls
 Fake – not a silver bullet
 Additional test layer:
Contract tests on fake/depended
component
 Do not test Fake, test SUT
Tests and Patterns
Tests & Patterns. Problems
 Scenarios duplicates
 Overflown locators / base classes /behavior
 Tones of code
 Inheritance hell
PageFactory
 PageFactory + [Attributes]
 Factory return needed page based on SiteName, PaymentMethod,
IsMobile
 No new for Page Object creation
 Fallback (from brand to common)
 Result: ~ -55% duplicates in test scenarios.
 Test request needed page from Factory (same method for all
brands)
 Test prepares and transmits data to PageObject
PageFactory
Common Naming
 XPath and component @data-name attribute
 Result: ~ -35% PageObject duplicates.
 Similar payment method pages are not duplicated
Template Method
 Define the skeleton of an algorithm in an operation,
deferring some steps to client subclasses.
 Template Method lets subclasses redefine certain steps of
an algorithm without changing the algorithm's structure
Template Method
 Behavioral interfaces for each component
IReceiptPage 
BankReceiptPage|WizardMobileReceiptPage|..
ReceiptPageBase – with complex step definition
 Result:
Logic encapsulated from base class to each
component implementation
Strategy Pattern
 Strategy pattern - enables an algorithm's behavior
to be selected at runtime.
Strategy Pattern
Strategy Pattern
 Strategy pattern on element-component:
 IMonthYearComponent 
Select2MonthYearComponent|
SelectMonthYearComponent |
InlineMonthYearComponent
 PageFactory init strategy context
 Result: ~ -60% duplicates in PageObjects
 All Brand-specific features overrides were removed
Tests & Patterns
 Scenarios duplicates
 Overflown locators /
base classes /behavior
 Tones of code
 Inheritance hell
 Factories
 Common naming
 Patterns
 Template method
 Strategy
Tests sugar. Screenshots
Test sugar
 SpecFlow & Given-When-Then structure
 Given - only preconditions
 When - all actions
 Then - only asserts
Screenshots on each test step
Screenshots in tests
 SpecFlow [AfterStep]
 Screenshot all steps
 Keep history
Screenshots. Visual testing
 Use extra step
 Continue on failure
 Use emulations
 Hardcode/Ignore dynamic values
How to make your life easier?
 Fake complex backend
 Simplify your architecture
 apply patterns
 use best practices
 Improve test feedback – use text, visual
information
What automation we get?
 Easy to write
 Clear to understand
 Simple to work with
That's all folks!
Questions?
Links
Test Doubles:
• http://xunitpatterns.com/Test%20Double.html
• https://www.martinfowler.com/bliki/TestDouble.html
Patterns:
• https://sourcemaking.com/design_patterns/behavioral_patterns
Me (Ivan Pashko):
• https://www.facebook.com/groups/1180099188730673/
Pictures:
• https://pixabay.com | https://unsplash.com

Weitere ähnliche Inhalte

Was ist angesagt?

Testing Web Services - QA or the Highway 2016
Testing Web Services - QA or the Highway 2016Testing Web Services - QA or the Highway 2016
Testing Web Services - QA or the Highway 2016Steinn 'Stan' Jónsson
 
Introduction to SoapUI day 1
Introduction to SoapUI day 1Introduction to SoapUI day 1
Introduction to SoapUI day 1Qualitest
 
Automation Frame works Instruction Sheet
Automation Frame works Instruction SheetAutomation Frame works Instruction Sheet
Automation Frame works Instruction SheetvodQA
 
Test automation
Test automationTest automation
Test automationXavier Yin
 
Enabling CD in Enterprises with Testing
Enabling CD in Enterprises with TestingEnabling CD in Enterprises with Testing
Enabling CD in Enterprises with TestingThoughtworks
 
KeytorcTestTalks #11 - Onur Başkirt, Agile Test Management with Testrail
KeytorcTestTalks #11 - Onur Başkirt, Agile Test Management with Testrail KeytorcTestTalks #11 - Onur Başkirt, Agile Test Management with Testrail
KeytorcTestTalks #11 - Onur Başkirt, Agile Test Management with Testrail Keytorc Software Testing Services
 
Software Test Patterns: Successes and Challenges
Software Test Patterns: Successes and ChallengesSoftware Test Patterns: Successes and Challenges
Software Test Patterns: Successes and ChallengesBob Binder
 
Using The Page Object Pattern
Using The Page Object PatternUsing The Page Object Pattern
Using The Page Object PatternDante Briones
 
Client-Side Performance Testing
Client-Side Performance TestingClient-Side Performance Testing
Client-Side Performance TestingAnand Bagmar
 
Test Automation
Test AutomationTest Automation
Test AutomationTomas Riha
 
Say NO To (More) Selenium Tests
Say NO To (More) Selenium TestsSay NO To (More) Selenium Tests
Say NO To (More) Selenium TestsAnand Bagmar
 
Patterns of a “good” test automation framework
Patterns of a “good” test automation frameworkPatterns of a “good” test automation framework
Patterns of a “good” test automation frameworkAnand Bagmar
 
Setup and run automated test framework for android application
Setup and run automated test framework for android applicationSetup and run automated test framework for android application
Setup and run automated test framework for android applicationKonstantin Natalukha
 
Elements of a Test Framework
Elements of a Test FrameworkElements of a Test Framework
Elements of a Test FrameworkSmartBear
 
30 of the best free software test tools in 60 minutes by Jess Lancaster
30 of the best free software test tools in 60 minutes by Jess Lancaster30 of the best free software test tools in 60 minutes by Jess Lancaster
30 of the best free software test tools in 60 minutes by Jess LancasterQA or the Highway
 
Eradicate Flaky Tests - AppiumConf 2021
Eradicate Flaky Tests - AppiumConf 2021Eradicate Flaky Tests - AppiumConf 2021
Eradicate Flaky Tests - AppiumConf 2021Anand Bagmar
 
Laws of test automation framework
Laws of test automation frameworkLaws of test automation framework
Laws of test automation frameworkvodqancr
 
Integration Testing in Enterprises using TaaS
Integration Testing in Enterprises using TaaSIntegration Testing in Enterprises using TaaS
Integration Testing in Enterprises using TaaSAnand Bagmar
 

Was ist angesagt? (20)

Testing Web Services - QA or the Highway 2016
Testing Web Services - QA or the Highway 2016Testing Web Services - QA or the Highway 2016
Testing Web Services - QA or the Highway 2016
 
Introduction to SoapUI day 1
Introduction to SoapUI day 1Introduction to SoapUI day 1
Introduction to SoapUI day 1
 
Automation Frame works Instruction Sheet
Automation Frame works Instruction SheetAutomation Frame works Instruction Sheet
Automation Frame works Instruction Sheet
 
Test automation
Test automationTest automation
Test automation
 
Enabling CD in Enterprises with Testing
Enabling CD in Enterprises with TestingEnabling CD in Enterprises with Testing
Enabling CD in Enterprises with Testing
 
KeytorcTestTalks #11 - Onur Başkirt, Agile Test Management with Testrail
KeytorcTestTalks #11 - Onur Başkirt, Agile Test Management with Testrail KeytorcTestTalks #11 - Onur Başkirt, Agile Test Management with Testrail
KeytorcTestTalks #11 - Onur Başkirt, Agile Test Management with Testrail
 
Software Test Patterns: Successes and Challenges
Software Test Patterns: Successes and ChallengesSoftware Test Patterns: Successes and Challenges
Software Test Patterns: Successes and Challenges
 
Using The Page Object Pattern
Using The Page Object PatternUsing The Page Object Pattern
Using The Page Object Pattern
 
Client-Side Performance Testing
Client-Side Performance TestingClient-Side Performance Testing
Client-Side Performance Testing
 
Test Automation
Test AutomationTest Automation
Test Automation
 
Say NO To (More) Selenium Tests
Say NO To (More) Selenium TestsSay NO To (More) Selenium Tests
Say NO To (More) Selenium Tests
 
Patterns of a “good” test automation framework
Patterns of a “good” test automation frameworkPatterns of a “good” test automation framework
Patterns of a “good” test automation framework
 
Setup and run automated test framework for android application
Setup and run automated test framework for android applicationSetup and run automated test framework for android application
Setup and run automated test framework for android application
 
Elements of a Test Framework
Elements of a Test FrameworkElements of a Test Framework
Elements of a Test Framework
 
30 of the best free software test tools in 60 minutes by Jess Lancaster
30 of the best free software test tools in 60 minutes by Jess Lancaster30 of the best free software test tools in 60 minutes by Jess Lancaster
30 of the best free software test tools in 60 minutes by Jess Lancaster
 
Automation With A Tool Demo
Automation With A Tool DemoAutomation With A Tool Demo
Automation With A Tool Demo
 
Eradicate Flaky Tests - AppiumConf 2021
Eradicate Flaky Tests - AppiumConf 2021Eradicate Flaky Tests - AppiumConf 2021
Eradicate Flaky Tests - AppiumConf 2021
 
Laws of test automation framework
Laws of test automation frameworkLaws of test automation framework
Laws of test automation framework
 
Qa process
Qa processQa process
Qa process
 
Integration Testing in Enterprises using TaaS
Integration Testing in Enterprises using TaaSIntegration Testing in Enterprises using TaaS
Integration Testing in Enterprises using TaaS
 

Andere mochten auch

Design patterns in test automation
Design patterns in test automationDesign patterns in test automation
Design patterns in test automationMikalai Alimenkou
 
WixAutomation - Test State Pattern - Selenium Camp 2017
WixAutomation - Test State Pattern - Selenium Camp 2017WixAutomation - Test State Pattern - Selenium Camp 2017
WixAutomation - Test State Pattern - Selenium Camp 2017Roi Ashkenazi
 
Testing Metrics - Making your tests visible
Testing Metrics - Making your tests visibleTesting Metrics - Making your tests visible
Testing Metrics - Making your tests visibleAlper Mermer
 
The wild wild west of Selenium Capabilities
The wild wild west of Selenium CapabilitiesThe wild wild west of Selenium Capabilities
The wild wild west of Selenium CapabilitiesAdi Ofri
 
Fabulous Tests on Spock and Groovy
Fabulous Tests on Spock and GroovyFabulous Tests on Spock and Groovy
Fabulous Tests on Spock and GroovyYaroslav Pernerovsky
 
End-to-End Test Automation for Both Horizontal and Vertical Scale
End-to-End Test Automation for Both Horizontal and Vertical ScaleEnd-to-End Test Automation for Both Horizontal and Vertical Scale
End-to-End Test Automation for Both Horizontal and Vertical ScaleErdem YILDIRIM
 
iOS Parallel Automation: run faster than fast — Viktar Karanevich — SeleniumC...
iOS Parallel Automation: run faster than fast — Viktar Karanevich — SeleniumC...iOS Parallel Automation: run faster than fast — Viktar Karanevich — SeleniumC...
iOS Parallel Automation: run faster than fast — Viktar Karanevich — SeleniumC...Badoo
 
Grading the Quality of Selenium Tests
Grading the Quality of Selenium TestsGrading the Quality of Selenium Tests
Grading the Quality of Selenium TestsMarcus Merrell
 
Test trend analysis: Towards robust reliable and timely tests
Test trend analysis: Towards robust reliable and timely testsTest trend analysis: Towards robust reliable and timely tests
Test trend analysis: Towards robust reliable and timely testsHugh McCamphill
 
How does Java 8 exert hidden power on Test Automation?
How does Java 8 exert hidden power on Test Automation?How does Java 8 exert hidden power on Test Automation?
How does Java 8 exert hidden power on Test Automation?Sergey Korol
 
Protractor framework – how to make stable e2e tests for Angular applications
Protractor framework – how to make stable e2e tests for Angular applicationsProtractor framework – how to make stable e2e tests for Angular applications
Protractor framework – how to make stable e2e tests for Angular applicationsLudmila Nesvitiy
 
Roman iovlev. Test UI with JDI - Selenium camp
Roman iovlev. Test UI with JDI - Selenium campRoman iovlev. Test UI with JDI - Selenium camp
Roman iovlev. Test UI with JDI - Selenium campРоман Иовлев
 
5 top pain points of test automation
5 top pain points of test automation5 top pain points of test automation
5 top pain points of test automationMikalai Alimenkou
 
Statistical Element Locator by Oren Rubin - SeleniumConf UK 2016
Statistical Element Locator by Oren Rubin - SeleniumConf UK 2016Statistical Element Locator by Oren Rubin - SeleniumConf UK 2016
Statistical Element Locator by Oren Rubin - SeleniumConf UK 2016Oren Rubin
 
UIAutomation + Mechanic.js
UIAutomation + Mechanic.jsUIAutomation + Mechanic.js
UIAutomation + Mechanic.jsjaykz52
 
The Future of Selenium Testing for Mobile Web and Native Apps
The Future of Selenium Testing for Mobile Web and Native AppsThe Future of Selenium Testing for Mobile Web and Native Apps
The Future of Selenium Testing for Mobile Web and Native AppsSauce Labs
 
Entrepreneurship from a regional market perspective
Entrepreneurship from a regional market perspectiveEntrepreneurship from a regional market perspective
Entrepreneurship from a regional market perspectiveRajaranjan Senapati
 
Survival of the Continuist
Survival of the ContinuistSurvival of the Continuist
Survival of the ContinuistPaul Blundell
 
Kesetimbangan kimia
Kesetimbangan kimiaKesetimbangan kimia
Kesetimbangan kimiawidhiyani
 
Justice ,justice shall you pursue
Justice ,justice shall you pursueJustice ,justice shall you pursue
Justice ,justice shall you pursueYonatanKay1
 

Andere mochten auch (20)

Design patterns in test automation
Design patterns in test automationDesign patterns in test automation
Design patterns in test automation
 
WixAutomation - Test State Pattern - Selenium Camp 2017
WixAutomation - Test State Pattern - Selenium Camp 2017WixAutomation - Test State Pattern - Selenium Camp 2017
WixAutomation - Test State Pattern - Selenium Camp 2017
 
Testing Metrics - Making your tests visible
Testing Metrics - Making your tests visibleTesting Metrics - Making your tests visible
Testing Metrics - Making your tests visible
 
The wild wild west of Selenium Capabilities
The wild wild west of Selenium CapabilitiesThe wild wild west of Selenium Capabilities
The wild wild west of Selenium Capabilities
 
Fabulous Tests on Spock and Groovy
Fabulous Tests on Spock and GroovyFabulous Tests on Spock and Groovy
Fabulous Tests on Spock and Groovy
 
End-to-End Test Automation for Both Horizontal and Vertical Scale
End-to-End Test Automation for Both Horizontal and Vertical ScaleEnd-to-End Test Automation for Both Horizontal and Vertical Scale
End-to-End Test Automation for Both Horizontal and Vertical Scale
 
iOS Parallel Automation: run faster than fast — Viktar Karanevich — SeleniumC...
iOS Parallel Automation: run faster than fast — Viktar Karanevich — SeleniumC...iOS Parallel Automation: run faster than fast — Viktar Karanevich — SeleniumC...
iOS Parallel Automation: run faster than fast — Viktar Karanevich — SeleniumC...
 
Grading the Quality of Selenium Tests
Grading the Quality of Selenium TestsGrading the Quality of Selenium Tests
Grading the Quality of Selenium Tests
 
Test trend analysis: Towards robust reliable and timely tests
Test trend analysis: Towards robust reliable and timely testsTest trend analysis: Towards robust reliable and timely tests
Test trend analysis: Towards robust reliable and timely tests
 
How does Java 8 exert hidden power on Test Automation?
How does Java 8 exert hidden power on Test Automation?How does Java 8 exert hidden power on Test Automation?
How does Java 8 exert hidden power on Test Automation?
 
Protractor framework – how to make stable e2e tests for Angular applications
Protractor framework – how to make stable e2e tests for Angular applicationsProtractor framework – how to make stable e2e tests for Angular applications
Protractor framework – how to make stable e2e tests for Angular applications
 
Roman iovlev. Test UI with JDI - Selenium camp
Roman iovlev. Test UI with JDI - Selenium campRoman iovlev. Test UI with JDI - Selenium camp
Roman iovlev. Test UI with JDI - Selenium camp
 
5 top pain points of test automation
5 top pain points of test automation5 top pain points of test automation
5 top pain points of test automation
 
Statistical Element Locator by Oren Rubin - SeleniumConf UK 2016
Statistical Element Locator by Oren Rubin - SeleniumConf UK 2016Statistical Element Locator by Oren Rubin - SeleniumConf UK 2016
Statistical Element Locator by Oren Rubin - SeleniumConf UK 2016
 
UIAutomation + Mechanic.js
UIAutomation + Mechanic.jsUIAutomation + Mechanic.js
UIAutomation + Mechanic.js
 
The Future of Selenium Testing for Mobile Web and Native Apps
The Future of Selenium Testing for Mobile Web and Native AppsThe Future of Selenium Testing for Mobile Web and Native Apps
The Future of Selenium Testing for Mobile Web and Native Apps
 
Entrepreneurship from a regional market perspective
Entrepreneurship from a regional market perspectiveEntrepreneurship from a regional market perspective
Entrepreneurship from a regional market perspective
 
Survival of the Continuist
Survival of the ContinuistSurvival of the Continuist
Survival of the Continuist
 
Kesetimbangan kimia
Kesetimbangan kimiaKesetimbangan kimia
Kesetimbangan kimia
 
Justice ,justice shall you pursue
Justice ,justice shall you pursueJustice ,justice shall you pursue
Justice ,justice shall you pursue
 

Ähnlich wie An easy way to automate complex UI

FrontendLab: Воркшоп "Just Test It". Артем Тритяк, Electric Cloud
FrontendLab: Воркшоп "Just Test It". Артем Тритяк, Electric CloudFrontendLab: Воркшоп "Just Test It". Артем Тритяк, Electric Cloud
FrontendLab: Воркшоп "Just Test It". Артем Тритяк, Electric CloudGeeksLab Odessa
 
CTTDNUG ASP.NET MVC
CTTDNUG ASP.NET MVCCTTDNUG ASP.NET MVC
CTTDNUG ASP.NET MVCBarry Gervin
 
Using Page Objects
Using Page ObjectsUsing Page Objects
Using Page ObjectsGetch88
 
Building Maintainable Android Apps (DroidCon NYC 2014)
Building Maintainable Android Apps (DroidCon NYC 2014)Building Maintainable Android Apps (DroidCon NYC 2014)
Building Maintainable Android Apps (DroidCon NYC 2014)Kevin Schultz
 
Designing for the internet - Page Objects for the Real World
Designing for the internet - Page Objects for the Real WorldDesigning for the internet - Page Objects for the Real World
Designing for the internet - Page Objects for the Real WorldQualitest
 
Python - code quality and production monitoring
Python - code quality and production monitoringPython - code quality and production monitoring
Python - code quality and production monitoringDavid Melamed
 
WebTest - Efficient Functional Web Testing with HtmlUnit and Beyond
WebTest - Efficient Functional Web Testing with HtmlUnit and BeyondWebTest - Efficient Functional Web Testing with HtmlUnit and Beyond
WebTest - Efficient Functional Web Testing with HtmlUnit and Beyondmguillem
 
Test Automation Frameworks Final
Test Automation Frameworks   FinalTest Automation Frameworks   Final
Test Automation Frameworks FinalMargaret_Dickman
 
Anand Ramdeo - Automation Frameworks - EuroSTAR 2012
Anand Ramdeo - Automation Frameworks - EuroSTAR 2012Anand Ramdeo - Automation Frameworks - EuroSTAR 2012
Anand Ramdeo - Automation Frameworks - EuroSTAR 2012TEST Huddle
 
Priyanka_3.5years_Resume
Priyanka_3.5years_ResumePriyanka_3.5years_Resume
Priyanka_3.5years_ResumePriyanka Banda
 
Joomla! Testing - J!DD Germany 2016
Joomla! Testing - J!DD Germany 2016Joomla! Testing - J!DD Germany 2016
Joomla! Testing - J!DD Germany 2016Yves Hoppe
 
Web and load testing with Visual Studio 2010 Ultimate
Web and load testing with Visual Studio 2010 UltimateWeb and load testing with Visual Studio 2010 Ultimate
Web and load testing with Visual Studio 2010 UltimateAbhimanyu Singhal
 
Nasdanika WebTest - Modular functional testing of Web and Mobile Applications
Nasdanika WebTest - Modular functional testing of Web and Mobile ApplicationsNasdanika WebTest - Modular functional testing of Web and Mobile Applications
Nasdanika WebTest - Modular functional testing of Web and Mobile ApplicationsPavel Vlasov
 
Bdd test automation analysis
Bdd test automation analysisBdd test automation analysis
Bdd test automation analysisssuser2e8d4b
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVCIntroduction to ASP.NET MVC
Introduction to ASP.NET MVCMaarten Balliauw
 
Beginning AngularJS
Beginning AngularJSBeginning AngularJS
Beginning AngularJSTroy Miles
 
COSCUP 2020 | Rain Wu | Functional verification test framework with Go
COSCUP 2020 | Rain Wu | Functional verification test framework with GoCOSCUP 2020 | Rain Wu | Functional verification test framework with Go
COSCUP 2020 | Rain Wu | Functional verification test framework with GoRain Wu
 

Ähnlich wie An easy way to automate complex UI (20)

FrontendLab: Воркшоп "Just Test It". Артем Тритяк, Electric Cloud
FrontendLab: Воркшоп "Just Test It". Артем Тритяк, Electric CloudFrontendLab: Воркшоп "Just Test It". Артем Тритяк, Electric Cloud
FrontendLab: Воркшоп "Just Test It". Артем Тритяк, Electric Cloud
 
Just Test It
Just Test ItJust Test It
Just Test It
 
CTTDNUG ASP.NET MVC
CTTDNUG ASP.NET MVCCTTDNUG ASP.NET MVC
CTTDNUG ASP.NET MVC
 
Using Page Objects
Using Page ObjectsUsing Page Objects
Using Page Objects
 
Building Maintainable Android Apps (DroidCon NYC 2014)
Building Maintainable Android Apps (DroidCon NYC 2014)Building Maintainable Android Apps (DroidCon NYC 2014)
Building Maintainable Android Apps (DroidCon NYC 2014)
 
Designing for the internet - Page Objects for the Real World
Designing for the internet - Page Objects for the Real WorldDesigning for the internet - Page Objects for the Real World
Designing for the internet - Page Objects for the Real World
 
Python - code quality and production monitoring
Python - code quality and production monitoringPython - code quality and production monitoring
Python - code quality and production monitoring
 
WebTest - Efficient Functional Web Testing with HtmlUnit and Beyond
WebTest - Efficient Functional Web Testing with HtmlUnit and BeyondWebTest - Efficient Functional Web Testing with HtmlUnit and Beyond
WebTest - Efficient Functional Web Testing with HtmlUnit and Beyond
 
Test Automation Frameworks Final
Test Automation Frameworks   FinalTest Automation Frameworks   Final
Test Automation Frameworks Final
 
Anand Ramdeo - Automation Frameworks - EuroSTAR 2012
Anand Ramdeo - Automation Frameworks - EuroSTAR 2012Anand Ramdeo - Automation Frameworks - EuroSTAR 2012
Anand Ramdeo - Automation Frameworks - EuroSTAR 2012
 
Priyanka_3.5years_Resume
Priyanka_3.5years_ResumePriyanka_3.5years_Resume
Priyanka_3.5years_Resume
 
Joomla! Testing - J!DD Germany 2016
Joomla! Testing - J!DD Germany 2016Joomla! Testing - J!DD Germany 2016
Joomla! Testing - J!DD Germany 2016
 
Web and load testing with Visual Studio 2010 Ultimate
Web and load testing with Visual Studio 2010 UltimateWeb and load testing with Visual Studio 2010 Ultimate
Web and load testing with Visual Studio 2010 Ultimate
 
Nasdanika WebTest - Modular functional testing of Web and Mobile Applications
Nasdanika WebTest - Modular functional testing of Web and Mobile ApplicationsNasdanika WebTest - Modular functional testing of Web and Mobile Applications
Nasdanika WebTest - Modular functional testing of Web and Mobile Applications
 
Bdd test automation analysis
Bdd test automation analysisBdd test automation analysis
Bdd test automation analysis
 
Starwest 2011
Starwest 2011Starwest 2011
Starwest 2011
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVCIntroduction to ASP.NET MVC
Introduction to ASP.NET MVC
 
Test Automation Pyramid
Test Automation PyramidTest Automation Pyramid
Test Automation Pyramid
 
Beginning AngularJS
Beginning AngularJSBeginning AngularJS
Beginning AngularJS
 
COSCUP 2020 | Rain Wu | Functional verification test framework with Go
COSCUP 2020 | Rain Wu | Functional verification test framework with GoCOSCUP 2020 | Rain Wu | Functional verification test framework with Go
COSCUP 2020 | Rain Wu | Functional verification test framework with Go
 

Kürzlich hochgeladen

No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...Sheetaleventcompany
 
call girls in delhi malviya nagar @9811711561@
call girls in delhi malviya nagar @9811711561@call girls in delhi malviya nagar @9811711561@
call girls in delhi malviya nagar @9811711561@vikas rana
 
Philippine History cavite Mutiny Report.ppt
Philippine History cavite Mutiny Report.pptPhilippine History cavite Mutiny Report.ppt
Philippine History cavite Mutiny Report.pptssuser319dad
 
Call Girls in Sarojini Nagar Market Delhi 💯 Call Us 🔝8264348440🔝
Call Girls in Sarojini Nagar Market Delhi 💯 Call Us 🔝8264348440🔝Call Girls in Sarojini Nagar Market Delhi 💯 Call Us 🔝8264348440🔝
Call Girls in Sarojini Nagar Market Delhi 💯 Call Us 🔝8264348440🔝soniya singh
 
OSCamp Kubernetes 2024 | A Tester's Guide to CI_CD as an Automated Quality Co...
OSCamp Kubernetes 2024 | A Tester's Guide to CI_CD as an Automated Quality Co...OSCamp Kubernetes 2024 | A Tester's Guide to CI_CD as an Automated Quality Co...
OSCamp Kubernetes 2024 | A Tester's Guide to CI_CD as an Automated Quality Co...NETWAYS
 
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...Kayode Fayemi
 
Russian Call Girls in Kolkata Vaishnavi 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Vaishnavi 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Vaishnavi 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Vaishnavi 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
Microsoft Copilot AI for Everyone - created by AI
Microsoft Copilot AI for Everyone - created by AIMicrosoft Copilot AI for Everyone - created by AI
Microsoft Copilot AI for Everyone - created by AITatiana Gurgel
 
ANCHORING SCRIPT FOR A CULTURAL EVENT.docx
ANCHORING SCRIPT FOR A CULTURAL EVENT.docxANCHORING SCRIPT FOR A CULTURAL EVENT.docx
ANCHORING SCRIPT FOR A CULTURAL EVENT.docxNikitaBankoti2
 
OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...
OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...
OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...NETWAYS
 
Night 7k Call Girls Noida Sector 128 Call Me: 8448380779
Night 7k Call Girls Noida Sector 128 Call Me: 8448380779Night 7k Call Girls Noida Sector 128 Call Me: 8448380779
Night 7k Call Girls Noida Sector 128 Call Me: 8448380779Delhi Call girls
 
Exploring protein-protein interactions by Weak Affinity Chromatography (WAC) ...
Exploring protein-protein interactions by Weak Affinity Chromatography (WAC) ...Exploring protein-protein interactions by Weak Affinity Chromatography (WAC) ...
Exploring protein-protein interactions by Weak Affinity Chromatography (WAC) ...Salam Al-Karadaghi
 
Open Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdf
Open Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdfOpen Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdf
Open Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdfhenrik385807
 
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night EnjoyCall Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night EnjoyPooja Nehwal
 
Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...
Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...
Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...NETWAYS
 
Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...
Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...
Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...Krijn Poppe
 
Motivation and Theory Maslow and Murray pdf
Motivation and Theory Maslow and Murray pdfMotivation and Theory Maslow and Murray pdf
Motivation and Theory Maslow and Murray pdfakankshagupta7348026
 
CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...
CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...
CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...henrik385807
 
CTAC 2024 Valencia - Henrik Hanke - Reduce to the max - slideshare.pdf
CTAC 2024 Valencia - Henrik Hanke - Reduce to the max - slideshare.pdfCTAC 2024 Valencia - Henrik Hanke - Reduce to the max - slideshare.pdf
CTAC 2024 Valencia - Henrik Hanke - Reduce to the max - slideshare.pdfhenrik385807
 
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara ServicesVVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara ServicesPooja Nehwal
 

Kürzlich hochgeladen (20)

No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
 
call girls in delhi malviya nagar @9811711561@
call girls in delhi malviya nagar @9811711561@call girls in delhi malviya nagar @9811711561@
call girls in delhi malviya nagar @9811711561@
 
Philippine History cavite Mutiny Report.ppt
Philippine History cavite Mutiny Report.pptPhilippine History cavite Mutiny Report.ppt
Philippine History cavite Mutiny Report.ppt
 
Call Girls in Sarojini Nagar Market Delhi 💯 Call Us 🔝8264348440🔝
Call Girls in Sarojini Nagar Market Delhi 💯 Call Us 🔝8264348440🔝Call Girls in Sarojini Nagar Market Delhi 💯 Call Us 🔝8264348440🔝
Call Girls in Sarojini Nagar Market Delhi 💯 Call Us 🔝8264348440🔝
 
OSCamp Kubernetes 2024 | A Tester's Guide to CI_CD as an Automated Quality Co...
OSCamp Kubernetes 2024 | A Tester's Guide to CI_CD as an Automated Quality Co...OSCamp Kubernetes 2024 | A Tester's Guide to CI_CD as an Automated Quality Co...
OSCamp Kubernetes 2024 | A Tester's Guide to CI_CD as an Automated Quality Co...
 
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
 
Russian Call Girls in Kolkata Vaishnavi 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Vaishnavi 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Vaishnavi 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Vaishnavi 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
Microsoft Copilot AI for Everyone - created by AI
Microsoft Copilot AI for Everyone - created by AIMicrosoft Copilot AI for Everyone - created by AI
Microsoft Copilot AI for Everyone - created by AI
 
ANCHORING SCRIPT FOR A CULTURAL EVENT.docx
ANCHORING SCRIPT FOR A CULTURAL EVENT.docxANCHORING SCRIPT FOR A CULTURAL EVENT.docx
ANCHORING SCRIPT FOR A CULTURAL EVENT.docx
 
OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...
OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...
OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...
 
Night 7k Call Girls Noida Sector 128 Call Me: 8448380779
Night 7k Call Girls Noida Sector 128 Call Me: 8448380779Night 7k Call Girls Noida Sector 128 Call Me: 8448380779
Night 7k Call Girls Noida Sector 128 Call Me: 8448380779
 
Exploring protein-protein interactions by Weak Affinity Chromatography (WAC) ...
Exploring protein-protein interactions by Weak Affinity Chromatography (WAC) ...Exploring protein-protein interactions by Weak Affinity Chromatography (WAC) ...
Exploring protein-protein interactions by Weak Affinity Chromatography (WAC) ...
 
Open Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdf
Open Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdfOpen Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdf
Open Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdf
 
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night EnjoyCall Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
 
Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...
Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...
Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...
 
Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...
Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...
Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...
 
Motivation and Theory Maslow and Murray pdf
Motivation and Theory Maslow and Murray pdfMotivation and Theory Maslow and Murray pdf
Motivation and Theory Maslow and Murray pdf
 
CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...
CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...
CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...
 
CTAC 2024 Valencia - Henrik Hanke - Reduce to the max - slideshare.pdf
CTAC 2024 Valencia - Henrik Hanke - Reduce to the max - slideshare.pdfCTAC 2024 Valencia - Henrik Hanke - Reduce to the max - slideshare.pdf
CTAC 2024 Valencia - Henrik Hanke - Reduce to the max - slideshare.pdf
 
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara ServicesVVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
 

An easy way to automate complex UI

  • 1. An easy way to automate complex UI Test automation practices and tips
  • 2. About me  7+ years in IT  Automation Engineer  Scrum Master  Betsson project, Ciklum 
  • 3. What we have  Payments Solution for online casino  20+ brands  7+ countries  40+ payment methods  Payment Pages UI (Desktop, mobile, adaptive)  Brand specific features
  • 5. Complex UI?  Complex fronted:  Dynamic  Async  Adaptive  Complex backend:  Hardly configurable  Overflown  Slow  Unstable
  • 6. Complex tests  Complex behavior  Complex architecture  Slow  Fragile  Overflown with scenario's  «Test smells» *  *http://xunitpatterns.com/TestSmells.html
  • 7. What automation we want?  Easy to write  Clear to understand  Simple to work with
  • 8. Agenda  Fakes & test doubles  Test & Patterns  Tips and tricks (test sugar & screenshots)
  • 9. Fakes & test doubles
  • 10. Test doubles  We replace a component on which the SUT depends with a "test-specific equivalent.“  Test Stub  Mock Object  Fake Object
  • 11. Test doubles  Web part  WebApi  Core System  DB  3rd systems
  • 12. Test doubles  Web part  WebApi / Fake  Core System  DB  3rd systems
  • 13. What can we solve with Fake  Test without dependent components  … without Backend  … without 3rd Party services  … without DB  Test unavailable component  Simplify scenarios precondition  Fix Slow/ Fragile / Heavyweight tests
  • 14. Static Fake  Static Fake – hardcoded behavior of dependent component.
  • 15. Static Fake. Pros  Have all specific behaviors  Any language for implementation*  Use for prototyping & local testing  Speedup tests  *Sometimes it very hard to mock backend on JavaScript
  • 16. Static Fake. Cons  It is not easy to implement  Test scenarios are not clear  Support
  • 17. Dynamic Fake  Configurable Fake Object - a reusable Test Double with the configurable values to be returned or verified during the fixture setup phase of a test.
  • 18. Dynamic Fake. Pros  Have all specific behaviors  Configured from test  Scenarios are clear & readable
  • 19. Dynamic Fake. Cons  Much harder for development  Can’t/hard to used for prototyping or local testing
  • 20. Pitfalls  Fake – not a silver bullet  Additional test layer: Contract tests on fake/depended component  Do not test Fake, test SUT
  • 22. Tests & Patterns. Problems  Scenarios duplicates  Overflown locators / base classes /behavior  Tones of code  Inheritance hell
  • 23. PageFactory  PageFactory + [Attributes]  Factory return needed page based on SiteName, PaymentMethod, IsMobile  No new for Page Object creation  Fallback (from brand to common)  Result: ~ -55% duplicates in test scenarios.  Test request needed page from Factory (same method for all brands)  Test prepares and transmits data to PageObject
  • 25. Common Naming  XPath and component @data-name attribute  Result: ~ -35% PageObject duplicates.  Similar payment method pages are not duplicated
  • 26. Template Method  Define the skeleton of an algorithm in an operation, deferring some steps to client subclasses.  Template Method lets subclasses redefine certain steps of an algorithm without changing the algorithm's structure
  • 27. Template Method  Behavioral interfaces for each component IReceiptPage  BankReceiptPage|WizardMobileReceiptPage|.. ReceiptPageBase – with complex step definition  Result: Logic encapsulated from base class to each component implementation
  • 28. Strategy Pattern  Strategy pattern - enables an algorithm's behavior to be selected at runtime.
  • 30. Strategy Pattern  Strategy pattern on element-component:  IMonthYearComponent  Select2MonthYearComponent| SelectMonthYearComponent | InlineMonthYearComponent  PageFactory init strategy context  Result: ~ -60% duplicates in PageObjects  All Brand-specific features overrides were removed
  • 31. Tests & Patterns  Scenarios duplicates  Overflown locators / base classes /behavior  Tones of code  Inheritance hell  Factories  Common naming  Patterns  Template method  Strategy
  • 33. Test sugar  SpecFlow & Given-When-Then structure  Given - only preconditions  When - all actions  Then - only asserts
  • 34. Screenshots on each test step
  • 35. Screenshots in tests  SpecFlow [AfterStep]  Screenshot all steps  Keep history
  • 36. Screenshots. Visual testing  Use extra step  Continue on failure  Use emulations  Hardcode/Ignore dynamic values
  • 37. How to make your life easier?  Fake complex backend  Simplify your architecture  apply patterns  use best practices  Improve test feedback – use text, visual information
  • 38. What automation we get?  Easy to write  Clear to understand  Simple to work with
  • 40. Links Test Doubles: • http://xunitpatterns.com/Test%20Double.html • https://www.martinfowler.com/bliki/TestDouble.html Patterns: • https://sourcemaking.com/design_patterns/behavioral_patterns Me (Ivan Pashko): • https://www.facebook.com/groups/1180099188730673/ Pictures: • https://pixabay.com | https://unsplash.com