SlideShare a Scribd company logo
Write the test
that you’d want
to read!
by Stanislaw Potoczny
Agenda
1. Introduction
2. Geb framework
3. Test architecture definition
4. Test architecture implementation
for Selenium WebDriver
The Beginning
SmartRecruiters
● Microservices (#200)
● Kubernetes
● Docker
● Angular
● Node
● Halogen
● GEB for E2e tests
GEB
Geb is a browser automation solution.
It brings together the power of WebDriver, the elegance of
jQuery content selection, the robustness of Page Object
modelling and the expressiveness of the Groovy language.
GEB - Page Object and Module
Geb implements a Page Object pattern via its
Module and Page class (user extends those
classes when creating it own)
Each Page object is consisted of three main
parts:
● Static URL
● Static At
● Static Content
Module represents a reusable unit
of Page content its structure is:
● Static Content
GEB - Page Object
GEB - Page Object
GEB - Page Object
GEB - Page Object
GEB - Page Object
GEB - Page Object
GEB - Page Object and Module
GEB - Page Object and Module
GEB - JQuery content selection - $()
GEB - JQuery content selection - $()
GEB - JQuery content selection - $()
GEB - JQuery content selection - $()
GEB - JQuery content selection - $()
And the reality...
How the reality looks like
● Slow
● Unstable
● No standard
● Hard to maintain
○ Refactor
○ To big page objects
○ Developer reluctance
● One repo for everything
● No ownership defined
Test Architecture
Test Class Controller Page Object
View Controller Model
Test Class Page Object
GEB/Selenium Yeah Pages
+ Whatever I need + Whatever I need
Page Object as Model
Only locators and possibilities
of how to interact with them
Controller
Controllers gathers actions
available on the page objects
in order to perform a business
action.
Controller
Controllers gathers actions
available on the page objects
in order to perform a business
action.
Controller
Controllers gathers actions
available on the page objects
in order to perform a business
action.
Controller
Controllers gathers actions
available on the page objects
in order to perform a business
action.
Test scenario as a view
View uses methods defined in
the controller written in high
level language.
View provides test data
WebDriver implementation
But we do not have GEB we
have got clean selenium…
We do not know Groovy...
WebDriver implementation
If your project is Java based
then you might consider use
Groovy and Groovy based
testing frameworks like GEB
and Spock.
Groovy is relatively easy for
Java developers and it brings
to the table lot of magic that
decreases test verbosity
WebDriver implementation
But we still do not want to...
WebDriver implementation
Then similar effects you can
obtain using Page Object
pattern, Java 8 default
methods in interfaces with
combination with fluent style
programming.
WebDriver implementation - problem
Simple test yet it is not visible
at the first glance
WebDriver implementation - problem
Simple test yet it is not visible
at the first glance
Selectors in a test class..
WebDriver implementation - problem
Simple test yet it is not visible
at the first glance
Selectors in a test class..
Test class does everything…
WebDriver implementation - problem
Simple test yet it is not visible
at the first glance
Selectors in a test class..
Test class does everything…
It slows down reading speed…
Increases frustration and most
importantly onboarding time of
the new less experienced
team members
WebDriver - What we want!
Test written in natural to the user
language, configuration and details
are abstracted away.
WebDriver - How To
1. Create abstract BaseTestClass - this class will hold all driver
configuration actions as well as clean up actions
2. Delegate Driver creation to the DriverFactory utility class
WebDriver - How To
1. Create abstract BaseTestClass - this class will hold all driver
configuration actions as well as clean up actions
2. Delegate Driver creation to the DriverFactory utility class
WebDriver - How To
WebDriver - How To -BasePageClass
3. Create abstract BasePageClass that will have common methods ex. $()
WebDriver - How To -BasePageClass
3. Create abstract BasePageClass that will have common methods ex. $()
WebDriver - How To -BasePageClass
3. Create abstract BasePageClass that will have common methods ex. $()
4. Create Page class that will
extend BasePageClass
WebDriver - How To
-BasePageClass
4. Create Page class that will
extend BasePageClass
5. Create locator definitions and
methods to operate on them
(see that Page do not consist
any business logic)
WebDriver - How To
-BasePageClass
4. Create Page class that will
extend BasePageClass
5. Create locator definitions and
methods to operate on them
(see that Page do not consist
any business logic)
WebDriver - How To
-BasePageClass
4. Create Page class that will
extend BasePageClass
5. Create locator definitions and
methods to operate on them
(see that Page do not consist
any business logic)
6. Apply method chaining (it is a
one way of fluent style
application)
WebDriver - How To
-BasePageClass
4. Create Page class that will
extend BasePageClass
5. Create locator definitions and
methods to operate on them
(see that Page do not consist
any business logic)
6. Apply method chaining (it is a
one way of fluent style
application)
WebDriver - How To
-BasePageClass
7. Create Interface that will
contain default methods. This
methods should gather actions
in a chain in order to perform a
business logic on the Page.
WebDriver - How To - Controllers
7. Create Interface that will
contain default methods. This
methods should gather actions
in a chain in order to perform a
business logic on the Page.
WebDriver - How To - Controllers
7. Create Interface that will
contain default methods. This
methods should gather actions
in a chain in order to perform a
business logic on the Page.
WebDriver - How To - Controllers
WebDriver - Putting all together
Takeaways - Why GEB
● Based on Selenium WebDriver
● Page Object is main focus of the framework
● jQuery style content selection
● Uses Groovy language
● WebDriver is a W3C recommendation
● Easy to start
● Productivity
To be honest, good E2E tests can be obtained without
GEB… and having a GEB do not ensure well written E2E
test as previously saw.
Think of the test architecture upfront so you won’t land
with a test suite that has to be refactored to the ground
Takeaways - Why GEB
Takeaways - Writing clear tests
● It helps with test maintainability
● It improves readability by providing human
friendly dsl
● It helps with onboarding new team
members
● It encourages reusability
● It is easier to debug if we know at which
step test failed
● It lives room for new testing approaches.
Thank You For Your Attention
Q&A?

More Related Content

What's hot

Angular js tutorial slides
Angular js tutorial slidesAngular js tutorial slides
Angular js tutorial slidessamhelman
 
AngularJS - What is it & Why is it awesome ? (with demos)
AngularJS - What is it & Why is it awesome ? (with demos)AngularJS - What is it & Why is it awesome ? (with demos)
AngularJS - What is it & Why is it awesome ? (with demos)Gary Arora
 
[Srijan Wednesday Webinars] Developing Large Scale Applications in AngularJS
[Srijan Wednesday Webinars] Developing Large Scale Applications in AngularJS[Srijan Wednesday Webinars] Developing Large Scale Applications in AngularJS
[Srijan Wednesday Webinars] Developing Large Scale Applications in AngularJSSrijan Technologies
 
AngularJS One Day Workshop
AngularJS One Day WorkshopAngularJS One Day Workshop
AngularJS One Day WorkshopShyam Seshadri
 
AngularJS application architecture
AngularJS application architectureAngularJS application architecture
AngularJS application architectureGabriele Falace
 
Polymer vs other libraries (Devfest Ukraine 2015)
Polymer vs other libraries (Devfest Ukraine 2015)Polymer vs other libraries (Devfest Ukraine 2015)
Polymer vs other libraries (Devfest Ukraine 2015)jskvara
 
Real World Web components
Real World Web componentsReal World Web components
Real World Web componentsJarrod Overson
 
Single Page Applications with AngularJS 2.0
Single Page Applications with AngularJS 2.0 Single Page Applications with AngularJS 2.0
Single Page Applications with AngularJS 2.0 Sumanth Chinthagunta
 
Polymer and web component
Polymer and web componentPolymer and web component
Polymer and web componentImam Raza
 
Angularjs architecture
Angularjs architectureAngularjs architecture
Angularjs architectureMichael He
 
AngularJS introduction
AngularJS introductionAngularJS introduction
AngularJS introductionTania Gonzales
 
The Complementarity of React and Web Components
The Complementarity of React and Web ComponentsThe Complementarity of React and Web Components
The Complementarity of React and Web ComponentsAndrew Rota
 
Web Components for Java Developers
Web Components for Java DevelopersWeb Components for Java Developers
Web Components for Java DevelopersJoonas Lehtinen
 
Google Polymer Introduction
Google Polymer IntroductionGoogle Polymer Introduction
Google Polymer IntroductionDavid Price
 
ForwardJS 2017 - Fullstack end-to-end Test Automation with node.js
ForwardJS 2017 -  Fullstack end-to-end Test Automation with node.jsForwardJS 2017 -  Fullstack end-to-end Test Automation with node.js
ForwardJS 2017 - Fullstack end-to-end Test Automation with node.jsMek Srunyu Stittri
 

What's hot (20)

React Vs AnagularJS
React Vs AnagularJSReact Vs AnagularJS
React Vs AnagularJS
 
Angular js tutorial slides
Angular js tutorial slidesAngular js tutorial slides
Angular js tutorial slides
 
AngularJS - What is it & Why is it awesome ? (with demos)
AngularJS - What is it & Why is it awesome ? (with demos)AngularJS - What is it & Why is it awesome ? (with demos)
AngularJS - What is it & Why is it awesome ? (with demos)
 
[Srijan Wednesday Webinars] Developing Large Scale Applications in AngularJS
[Srijan Wednesday Webinars] Developing Large Scale Applications in AngularJS[Srijan Wednesday Webinars] Developing Large Scale Applications in AngularJS
[Srijan Wednesday Webinars] Developing Large Scale Applications in AngularJS
 
AngularJS One Day Workshop
AngularJS One Day WorkshopAngularJS One Day Workshop
AngularJS One Day Workshop
 
AngularJS application architecture
AngularJS application architectureAngularJS application architecture
AngularJS application architecture
 
Polymer vs other libraries (Devfest Ukraine 2015)
Polymer vs other libraries (Devfest Ukraine 2015)Polymer vs other libraries (Devfest Ukraine 2015)
Polymer vs other libraries (Devfest Ukraine 2015)
 
Real World Web components
Real World Web componentsReal World Web components
Real World Web components
 
Single Page Applications with AngularJS 2.0
Single Page Applications with AngularJS 2.0 Single Page Applications with AngularJS 2.0
Single Page Applications with AngularJS 2.0
 
Polymer and web component
Polymer and web componentPolymer and web component
Polymer and web component
 
Angularjs architecture
Angularjs architectureAngularjs architecture
Angularjs architecture
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
 
AngularJS introduction
AngularJS introductionAngularJS introduction
AngularJS introduction
 
AngularJS
AngularJSAngularJS
AngularJS
 
The Complementarity of React and Web Components
The Complementarity of React and Web ComponentsThe Complementarity of React and Web Components
The Complementarity of React and Web Components
 
Booting up with polymer
Booting up with polymerBooting up with polymer
Booting up with polymer
 
Web Components for Java Developers
Web Components for Java DevelopersWeb Components for Java Developers
Web Components for Java Developers
 
ReactJs
ReactJsReactJs
ReactJs
 
Google Polymer Introduction
Google Polymer IntroductionGoogle Polymer Introduction
Google Polymer Introduction
 
ForwardJS 2017 - Fullstack end-to-end Test Automation with node.js
ForwardJS 2017 -  Fullstack end-to-end Test Automation with node.jsForwardJS 2017 -  Fullstack end-to-end Test Automation with node.js
ForwardJS 2017 - Fullstack end-to-end Test Automation with node.js
 

Similar to Stanislaw potoczny kra_qa_21.01.20

Comprehensive Browser Automation Solution using Groovy, WebDriver & Obect Model
Comprehensive Browser Automation Solution using Groovy, WebDriver & Obect ModelComprehensive Browser Automation Solution using Groovy, WebDriver & Obect Model
Comprehensive Browser Automation Solution using Groovy, WebDriver & Obect ModelvodQA
 
AngularJS Beginner Day One
AngularJS Beginner Day OneAngularJS Beginner Day One
AngularJS Beginner Day OneTroy Miles
 
Top100summit 谷歌-scott-improve your automated web application testing
Top100summit  谷歌-scott-improve your automated web application testingTop100summit  谷歌-scott-improve your automated web application testing
Top100summit 谷歌-scott-improve your automated web application testingdrewz lin
 
Javascript ui for rest services
Javascript ui for rest servicesJavascript ui for rest services
Javascript ui for rest servicesIoan Eugen Stan
 
Chapter15-Presentation.pptx
Chapter15-Presentation.pptxChapter15-Presentation.pptx
Chapter15-Presentation.pptxGFRomano
 
Node.js and Selenium Webdriver, a journey from the Java side
Node.js and Selenium Webdriver, a journey from the Java sideNode.js and Selenium Webdriver, a journey from the Java side
Node.js and Selenium Webdriver, a journey from the Java sideMek Srunyu Stittri
 
From Backbone to Ember and Back(bone) Again
From Backbone to Ember and Back(bone) AgainFrom Backbone to Ember and Back(bone) Again
From Backbone to Ember and Back(bone) Againjonknapp
 
Agile NCR 2013 - Gaurav Bansal- web_automation
Agile NCR 2013 - Gaurav Bansal- web_automationAgile NCR 2013 - Gaurav Bansal- web_automation
Agile NCR 2013 - Gaurav Bansal- web_automationAgileNCR2013
 
Creating Modular Test-Driven SPAs with Spring and AngularJS
Creating Modular Test-Driven SPAs with Spring and AngularJSCreating Modular Test-Driven SPAs with Spring and AngularJS
Creating Modular Test-Driven SPAs with Spring and AngularJSGunnar Hillert
 
Step by step - Selenium 3 web-driver - From Scratch
Step by step - Selenium 3 web-driver - From Scratch  Step by step - Selenium 3 web-driver - From Scratch
Step by step - Selenium 3 web-driver - From Scratch Haitham Refaat
 
Angularjs 131211063348-phpapp01
Angularjs 131211063348-phpapp01Angularjs 131211063348-phpapp01
Angularjs 131211063348-phpapp01Arunangsu Sahu
 
ME vs WEB - AngularJS Fundamentals
ME vs WEB - AngularJS FundamentalsME vs WEB - AngularJS Fundamentals
ME vs WEB - AngularJS FundamentalsAviran Cohen
 
Effective testing of rich internet applications
Effective testing of rich internet applicationsEffective testing of rich internet applications
Effective testing of rich internet applicationsRashwin
 
Frontend Workflow
Frontend WorkflowFrontend Workflow
Frontend WorkflowDelphiCon
 
Automation - web testing with selenium
Automation - web testing with seleniumAutomation - web testing with selenium
Automation - web testing with seleniumTzirla Rozental
 
The WebView Role in Hybrid Applications
The WebView Role in Hybrid ApplicationsThe WebView Role in Hybrid Applications
The WebView Role in Hybrid ApplicationsHaim Michael
 

Similar to Stanislaw potoczny kra_qa_21.01.20 (20)

Comprehensive Browser Automation Solution using Groovy, WebDriver & Obect Model
Comprehensive Browser Automation Solution using Groovy, WebDriver & Obect ModelComprehensive Browser Automation Solution using Groovy, WebDriver & Obect Model
Comprehensive Browser Automation Solution using Groovy, WebDriver & Obect Model
 
AngularJS Beginner Day One
AngularJS Beginner Day OneAngularJS Beginner Day One
AngularJS Beginner Day One
 
Top100summit 谷歌-scott-improve your automated web application testing
Top100summit  谷歌-scott-improve your automated web application testingTop100summit  谷歌-scott-improve your automated web application testing
Top100summit 谷歌-scott-improve your automated web application testing
 
Javascript ui for rest services
Javascript ui for rest servicesJavascript ui for rest services
Javascript ui for rest services
 
Chapter15-Presentation.pptx
Chapter15-Presentation.pptxChapter15-Presentation.pptx
Chapter15-Presentation.pptx
 
Node.js and Selenium Webdriver, a journey from the Java side
Node.js and Selenium Webdriver, a journey from the Java sideNode.js and Selenium Webdriver, a journey from the Java side
Node.js and Selenium Webdriver, a journey from the Java side
 
From Backbone to Ember and Back(bone) Again
From Backbone to Ember and Back(bone) AgainFrom Backbone to Ember and Back(bone) Again
From Backbone to Ember and Back(bone) Again
 
Agile NCR 2013 - Gaurav Bansal- web_automation
Agile NCR 2013 - Gaurav Bansal- web_automationAgile NCR 2013 - Gaurav Bansal- web_automation
Agile NCR 2013 - Gaurav Bansal- web_automation
 
Creating Modular Test-Driven SPAs with Spring and AngularJS
Creating Modular Test-Driven SPAs with Spring and AngularJSCreating Modular Test-Driven SPAs with Spring and AngularJS
Creating Modular Test-Driven SPAs with Spring and AngularJS
 
Step by step - Selenium 3 web-driver - From Scratch
Step by step - Selenium 3 web-driver - From Scratch  Step by step - Selenium 3 web-driver - From Scratch
Step by step - Selenium 3 web-driver - From Scratch
 
AngularJs
AngularJsAngularJs
AngularJs
 
Angularjs 131211063348-phpapp01
Angularjs 131211063348-phpapp01Angularjs 131211063348-phpapp01
Angularjs 131211063348-phpapp01
 
ME vs WEB - AngularJS Fundamentals
ME vs WEB - AngularJS FundamentalsME vs WEB - AngularJS Fundamentals
ME vs WEB - AngularJS Fundamentals
 
Angular js
Angular jsAngular js
Angular js
 
Jbehave selenium
Jbehave seleniumJbehave selenium
Jbehave selenium
 
Effective testing of rich internet applications
Effective testing of rich internet applicationsEffective testing of rich internet applications
Effective testing of rich internet applications
 
Frontend Workflow
Frontend WorkflowFrontend Workflow
Frontend Workflow
 
Automation - web testing with selenium
Automation - web testing with seleniumAutomation - web testing with selenium
Automation - web testing with selenium
 
The WebView Role in Hybrid Applications
The WebView Role in Hybrid ApplicationsThe WebView Role in Hybrid Applications
The WebView Role in Hybrid Applications
 
Protractor overview
Protractor overviewProtractor overview
Protractor overview
 

More from kraqa

RestAssured w sluzbie testow API
RestAssured w sluzbie testow APIRestAssured w sluzbie testow API
RestAssured w sluzbie testow APIkraqa
 
Postman - podstawy testowania REST API
Postman - podstawy testowania REST APIPostman - podstawy testowania REST API
Postman - podstawy testowania REST APIkraqa
 
Machine learning powered regression - KraQA 42 - Pawel Dyrek
Machine learning powered regression - KraQA 42 - Pawel Dyrek Machine learning powered regression - KraQA 42 - Pawel Dyrek
Machine learning powered regression - KraQA 42 - Pawel Dyrek kraqa
 
Kontrakt testy - KraQA 42 - Slawomir Radzyminski
Kontrakt testy - KraQA 42 - Slawomir RadzyminskiKontrakt testy - KraQA 42 - Slawomir Radzyminski
Kontrakt testy - KraQA 42 - Slawomir Radzyminskikraqa
 
KraQA#41 - PageFactory
KraQA#41 - PageFactoryKraQA#41 - PageFactory
KraQA#41 - PageFactorykraqa
 
KraQA#39 - Jak testowac tool do testow
KraQA#39 - Jak testowac tool do testowKraQA#39 - Jak testowac tool do testow
KraQA#39 - Jak testowac tool do testowkraqa
 
Hyperion - wystarczy jeden shake
Hyperion - wystarczy jeden shakeHyperion - wystarczy jeden shake
Hyperion - wystarczy jeden shakekraqa
 
Wybor urzadzen mobilnych do testow
Wybor urzadzen mobilnych do testowWybor urzadzen mobilnych do testow
Wybor urzadzen mobilnych do testowkraqa
 
Continuous security
Continuous securityContinuous security
Continuous securitykraqa
 
Let s meet inside
Let s meet insideLet s meet inside
Let s meet insidekraqa
 
O wezu przy kawie
O wezu przy kawieO wezu przy kawie
O wezu przy kawiekraqa
 
Strategia do automatów
Strategia do automatówStrategia do automatów
Strategia do automatówkraqa
 
Z czym do api
Z czym do apiZ czym do api
Z czym do apikraqa
 
Jenkins pipelines
Jenkins pipelinesJenkins pipelines
Jenkins pipelineskraqa
 
Testy UI
Testy UITesty UI
Testy UIkraqa
 
Tester w pułapce myślenia
Tester w pułapce myśleniaTester w pułapce myślenia
Tester w pułapce myśleniakraqa
 
Kiedy tester zostaje managerem
Kiedy tester zostaje manageremKiedy tester zostaje managerem
Kiedy tester zostaje manageremkraqa
 
KraQA#32 - RODO
KraQA#32 - RODOKraQA#32 - RODO
KraQA#32 - RODOkraqa
 
SkładQA 2018 - Daniel Dec
SkładQA 2018 - Daniel DecSkładQA 2018 - Daniel Dec
SkładQA 2018 - Daniel Deckraqa
 
Od Produktywności do Sabotażu - Sławomir Radzymiński, KraQA #31
Od Produktywności do Sabotażu - Sławomir Radzymiński, KraQA #31Od Produktywności do Sabotażu - Sławomir Radzymiński, KraQA #31
Od Produktywności do Sabotażu - Sławomir Radzymiński, KraQA #31kraqa
 

More from kraqa (20)

RestAssured w sluzbie testow API
RestAssured w sluzbie testow APIRestAssured w sluzbie testow API
RestAssured w sluzbie testow API
 
Postman - podstawy testowania REST API
Postman - podstawy testowania REST APIPostman - podstawy testowania REST API
Postman - podstawy testowania REST API
 
Machine learning powered regression - KraQA 42 - Pawel Dyrek
Machine learning powered regression - KraQA 42 - Pawel Dyrek Machine learning powered regression - KraQA 42 - Pawel Dyrek
Machine learning powered regression - KraQA 42 - Pawel Dyrek
 
Kontrakt testy - KraQA 42 - Slawomir Radzyminski
Kontrakt testy - KraQA 42 - Slawomir RadzyminskiKontrakt testy - KraQA 42 - Slawomir Radzyminski
Kontrakt testy - KraQA 42 - Slawomir Radzyminski
 
KraQA#41 - PageFactory
KraQA#41 - PageFactoryKraQA#41 - PageFactory
KraQA#41 - PageFactory
 
KraQA#39 - Jak testowac tool do testow
KraQA#39 - Jak testowac tool do testowKraQA#39 - Jak testowac tool do testow
KraQA#39 - Jak testowac tool do testow
 
Hyperion - wystarczy jeden shake
Hyperion - wystarczy jeden shakeHyperion - wystarczy jeden shake
Hyperion - wystarczy jeden shake
 
Wybor urzadzen mobilnych do testow
Wybor urzadzen mobilnych do testowWybor urzadzen mobilnych do testow
Wybor urzadzen mobilnych do testow
 
Continuous security
Continuous securityContinuous security
Continuous security
 
Let s meet inside
Let s meet insideLet s meet inside
Let s meet inside
 
O wezu przy kawie
O wezu przy kawieO wezu przy kawie
O wezu przy kawie
 
Strategia do automatów
Strategia do automatówStrategia do automatów
Strategia do automatów
 
Z czym do api
Z czym do apiZ czym do api
Z czym do api
 
Jenkins pipelines
Jenkins pipelinesJenkins pipelines
Jenkins pipelines
 
Testy UI
Testy UITesty UI
Testy UI
 
Tester w pułapce myślenia
Tester w pułapce myśleniaTester w pułapce myślenia
Tester w pułapce myślenia
 
Kiedy tester zostaje managerem
Kiedy tester zostaje manageremKiedy tester zostaje managerem
Kiedy tester zostaje managerem
 
KraQA#32 - RODO
KraQA#32 - RODOKraQA#32 - RODO
KraQA#32 - RODO
 
SkładQA 2018 - Daniel Dec
SkładQA 2018 - Daniel DecSkładQA 2018 - Daniel Dec
SkładQA 2018 - Daniel Dec
 
Od Produktywności do Sabotażu - Sławomir Radzymiński, KraQA #31
Od Produktywności do Sabotażu - Sławomir Radzymiński, KraQA #31Od Produktywności do Sabotażu - Sławomir Radzymiński, KraQA #31
Od Produktywności do Sabotażu - Sławomir Radzymiński, KraQA #31
 

Recently uploaded

Advanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowAdvanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowPeter Caitens
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns
 
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdfA Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdfkalichargn70th171
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxwottaspaceseo
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptxGeorgi Kodinov
 
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...rajkumar669520
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...informapgpstrackings
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsGlobus
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...Juraj Vysvader
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024Ortus Solutions, Corp
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILNatan Silnitsky
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessWSO2
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Globus
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Globus
 
De mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FMEDe mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FMEJelle | Nordend
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesKrzysztofKkol1
 

Recently uploaded (20)

Advanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowAdvanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should Know
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdfA Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
De mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FMEDe mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FME
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web Services
 

Stanislaw potoczny kra_qa_21.01.20

  • 1. Write the test that you’d want to read! by Stanislaw Potoczny
  • 2. Agenda 1. Introduction 2. Geb framework 3. Test architecture definition 4. Test architecture implementation for Selenium WebDriver
  • 3. The Beginning SmartRecruiters ● Microservices (#200) ● Kubernetes ● Docker ● Angular ● Node ● Halogen ● GEB for E2e tests
  • 4.
  • 5.
  • 6.
  • 7. GEB Geb is a browser automation solution. It brings together the power of WebDriver, the elegance of jQuery content selection, the robustness of Page Object modelling and the expressiveness of the Groovy language.
  • 8. GEB - Page Object and Module Geb implements a Page Object pattern via its Module and Page class (user extends those classes when creating it own) Each Page object is consisted of three main parts: ● Static URL ● Static At ● Static Content Module represents a reusable unit of Page content its structure is: ● Static Content
  • 9. GEB - Page Object
  • 10. GEB - Page Object
  • 11. GEB - Page Object
  • 12. GEB - Page Object
  • 13. GEB - Page Object
  • 14. GEB - Page Object
  • 15. GEB - Page Object and Module
  • 16. GEB - Page Object and Module
  • 17. GEB - JQuery content selection - $()
  • 18. GEB - JQuery content selection - $()
  • 19. GEB - JQuery content selection - $()
  • 20. GEB - JQuery content selection - $()
  • 21. GEB - JQuery content selection - $()
  • 23.
  • 24. How the reality looks like ● Slow ● Unstable ● No standard ● Hard to maintain ○ Refactor ○ To big page objects ○ Developer reluctance ● One repo for everything ● No ownership defined
  • 25. Test Architecture Test Class Controller Page Object View Controller Model Test Class Page Object GEB/Selenium Yeah Pages + Whatever I need + Whatever I need
  • 26. Page Object as Model Only locators and possibilities of how to interact with them
  • 27. Controller Controllers gathers actions available on the page objects in order to perform a business action.
  • 28. Controller Controllers gathers actions available on the page objects in order to perform a business action.
  • 29. Controller Controllers gathers actions available on the page objects in order to perform a business action.
  • 30. Controller Controllers gathers actions available on the page objects in order to perform a business action.
  • 31. Test scenario as a view View uses methods defined in the controller written in high level language. View provides test data
  • 32. WebDriver implementation But we do not have GEB we have got clean selenium… We do not know Groovy...
  • 33. WebDriver implementation If your project is Java based then you might consider use Groovy and Groovy based testing frameworks like GEB and Spock. Groovy is relatively easy for Java developers and it brings to the table lot of magic that decreases test verbosity
  • 34. WebDriver implementation But we still do not want to...
  • 35. WebDriver implementation Then similar effects you can obtain using Page Object pattern, Java 8 default methods in interfaces with combination with fluent style programming.
  • 36. WebDriver implementation - problem Simple test yet it is not visible at the first glance
  • 37. WebDriver implementation - problem Simple test yet it is not visible at the first glance Selectors in a test class..
  • 38. WebDriver implementation - problem Simple test yet it is not visible at the first glance Selectors in a test class.. Test class does everything…
  • 39. WebDriver implementation - problem Simple test yet it is not visible at the first glance Selectors in a test class.. Test class does everything… It slows down reading speed… Increases frustration and most importantly onboarding time of the new less experienced team members
  • 40. WebDriver - What we want! Test written in natural to the user language, configuration and details are abstracted away.
  • 41. WebDriver - How To 1. Create abstract BaseTestClass - this class will hold all driver configuration actions as well as clean up actions 2. Delegate Driver creation to the DriverFactory utility class
  • 42. WebDriver - How To 1. Create abstract BaseTestClass - this class will hold all driver configuration actions as well as clean up actions 2. Delegate Driver creation to the DriverFactory utility class
  • 44. WebDriver - How To -BasePageClass 3. Create abstract BasePageClass that will have common methods ex. $()
  • 45. WebDriver - How To -BasePageClass 3. Create abstract BasePageClass that will have common methods ex. $()
  • 46. WebDriver - How To -BasePageClass 3. Create abstract BasePageClass that will have common methods ex. $()
  • 47. 4. Create Page class that will extend BasePageClass WebDriver - How To -BasePageClass
  • 48. 4. Create Page class that will extend BasePageClass 5. Create locator definitions and methods to operate on them (see that Page do not consist any business logic) WebDriver - How To -BasePageClass
  • 49. 4. Create Page class that will extend BasePageClass 5. Create locator definitions and methods to operate on them (see that Page do not consist any business logic) WebDriver - How To -BasePageClass
  • 50. 4. Create Page class that will extend BasePageClass 5. Create locator definitions and methods to operate on them (see that Page do not consist any business logic) 6. Apply method chaining (it is a one way of fluent style application) WebDriver - How To -BasePageClass
  • 51. 4. Create Page class that will extend BasePageClass 5. Create locator definitions and methods to operate on them (see that Page do not consist any business logic) 6. Apply method chaining (it is a one way of fluent style application) WebDriver - How To -BasePageClass
  • 52. 7. Create Interface that will contain default methods. This methods should gather actions in a chain in order to perform a business logic on the Page. WebDriver - How To - Controllers
  • 53. 7. Create Interface that will contain default methods. This methods should gather actions in a chain in order to perform a business logic on the Page. WebDriver - How To - Controllers
  • 54. 7. Create Interface that will contain default methods. This methods should gather actions in a chain in order to perform a business logic on the Page. WebDriver - How To - Controllers
  • 55. WebDriver - Putting all together
  • 56. Takeaways - Why GEB ● Based on Selenium WebDriver ● Page Object is main focus of the framework ● jQuery style content selection ● Uses Groovy language ● WebDriver is a W3C recommendation ● Easy to start ● Productivity
  • 57. To be honest, good E2E tests can be obtained without GEB… and having a GEB do not ensure well written E2E test as previously saw. Think of the test architecture upfront so you won’t land with a test suite that has to be refactored to the ground Takeaways - Why GEB
  • 58. Takeaways - Writing clear tests ● It helps with test maintainability ● It improves readability by providing human friendly dsl ● It helps with onboarding new team members ● It encourages reusability ● It is easier to debug if we know at which step test failed ● It lives room for new testing approaches.
  • 59. Thank You For Your Attention Q&A?