SlideShare a Scribd company logo
ACCEPTANCE testing of web ui
using webdriver, thucydides and groovy
                                            story




       volodymyr tsukur // follow me : twitter.com/flushdia or email to flushdia@gmail.com
team &
                  tech lead @




                   partner @




vladimir tsukur



                  10+ years dev experience
BASED ON REAL PRODUCT DEV
App #1. Media logger
APP #2. JOURNALIST
COMMON UI
TEAMS


media logger                      journalist




               COre / COMMON UI




  editor                          producer
CUSTOMERS
               OF CORE UI

media logger                      journalist




               COre / COMMON UI




  editor                          producer
APPS RELEASE
                         6 months




            FEATUREs
            4.5 months



1   2   3    4     5       6        7   8   9    10     11    12

                                                 1.5 months


                                                REGRESSION
WHAT’s IMPORTANT FOR CORE?

        DELIVER FREQUENTLY




        DELIVER STABLE COMPONENTS
CORE DELIVERY



EVERY TWo WEEKS
1   2   3    4   5   6   7   8   9   10   11   12
COMPLEXITIES

   REQUIREMENTS NOT ALWAYS DETAILED *



   NOT ENOUGH FOCUS ON AUTOMATION
   FROM THE BEGINNING OF THE PROJECT


   TESTERS NOT fluent in automation,
   NEED ASSISTANCE
AS A
                   RESULT ...
 LONG MANUAL                         WRONG STUFF
TESTING CYCLES                       DELIVERED *




     MISSED BUGS                  APPS TEAMS
                                SLOWED DOWN
WE CAN DO BETTER!



TEAM
CHANGE

AUTOMATED
ACCEPTANCE
  TESTING
STEP 1: discuss
     user story

             QA


PO



            DEV


                       Acceptance criteria
STEPS 2 & 3: distill and develop
             QA

                           automated
                        Acceptance tests




             DEV
Acceptance                    FEATURE
  criteria                IMPLEMENTATION
                       (driven by unit and
                        integration tests)
STEP 4: demo


   automated
Acceptance tests



                        PO
                                  DONE!
                     approval


    FEATURE
IMPLEMENTATION
important:
   developers help
qa with technical stuff
important:
customer plays the game
    customer   dev team
ENFORCED BY dod


         STORY NOT RESOLVED
     IF automated acceptance
         testing is not DONE
INITIALLy SLOWED DOWN
                             but then
                   accelerated again!
iteration #n




                 iteration #n+1


                                  ...   iteration #n+M ...
benefits

                                    * early
                                 requirements
less bugs                        clarification
                                 and common
                                understanding




        more       APPS TEAMS
     automation   not delayed
not used in prototyping
technical stuff
tooling




testng
WHY                 ?

 «... Selenium is a suite of tools
 to automate web browsers
 across many platforms ...»
WHY              ?

      «... tool that let’s you use
      WebDriver-based tests to
      write more flexible and more
      reusable WebDriver-based
      tests, and also to generate
      documentation about your
      acceptance tests ...»
WHY testng ?
WHY not         ?
  * more flexible listener
  ecosystem *

  * project-specific testng
  extensions already
  available
why groovy?

dynamic, compact syntax
jvm-compatible
powerful processing primitives
no-brainer for javists
groovy vs java
                getSelectedRowColumns()




[«RE: defect ...», «Andrii Shapovalov», «Wed Oct 13:59:04 ...»]
getSelectedRowColumns()   java
getSelectedRowColumns()   groovy
getSelectedRowColumns()
getSelectedRowColumns()   groovy
  dynamic types
  easy collection processing
  closures
  use variables in string literals
  implicit return statement
  ‘public’ visibility is the default
layered architecture
tests
        steps
                page objects
        1.
        2.
        3.
                          webdriver
        ...
example

              USER story


    As an asset list user
    I want to rename asset
    so that the name of the asset
    corresponds to its content
acceptance criteria
        * i can do in-place editing of the
        single asset

        * I can enter edit mode using
        keyboard shortcuts

        * i can submit new name
        and see the change right away

        * i can abort RENAMING while in
        edit mode and see that the name
        stays intact
acceptance tests
do first things first!
our first test

   Asset list view should enter edit
   mode when user presses
   and should accept changes when
   user presses
   while in edit mode
our first test
test steps
             injected
             automatically
test steps
test steps
test steps
test steps
test steps
test steps
test steps
test steps
test steps




state is recorded when step is called
asset navigation steps
        page object
asset navigation steps

                * high-level and
                readable api
                free from
                webdriver
                specifics
asset navigation steps
        page object   * high-level and
                      readable api
                      free from
                      webdriver
                      specifics

                      * interact with
                      page object(s)
asset navigation steps

                * high-level and
                readable api
                free from
                webdriver
                specifics

                * interact with
                page object(s)

                * reused
                between tests
asset renaming steps
asset renaming steps
story / feature mapping
test report
test report
Acceptance Testing of Web UI
Acceptance Testing of Web UI
what we like

steps
mapping to features and stories
reporting with screenshots
utilities for webdriver
what we

lack of testng support

no dynamic page fragments

direct safari support
page objects
componentize your UI domain model
composite views
TABS                     asset
                          list
                         view

TAB
keep page object api high-level
minimum-to-no use of
   webdriver api in
   page object api
          minimal exposure of
      1   internals


          api is strictly domain
      2   focused
fluency
locating page objects




    how to find required component
among multiple instances (e.g. «projects»)?
@Findby with default
search context does not
fit because it has whole-
page context




use loadable
component or «custom
loadable component»
locating page objects




+
    create page object with
    domain-specific arguments


+   use builder.init to wire-up elements
locating page objects

                         @findby is in
                         the context of
                         root element
builder locates
root element
and optionally
sets it to a field
graphene page fragments




                in scope of @root
‘tools’ project
    QA                                 QA




Media logger                       JOURNALIST


    QA                                 QA


                  page objects +
                      steps +
   editor           framework      producer
Delivery:



                   +

                            page object
web component
                            steps object
javascript object proxies
ideally tests are not aware of
implementation details,
e.g. JS APIs present on the page



... but use of these APIs may
significantly simplify
development of ui tests
how to use js in groovy / java?
webdriver’s execute script




  return / pass dom elements only,
other objects are serialized to string
how to easily map js
objects to java runtime?




how to simplify java-to-
javascript interop
without explicit calls to
#executescript?
let’s invent
         js object
       proxy factory


TEAM
simple proxy
simple proxy
proxy from external source
            $root/javascriptobject.js




                 search by convention
elements in proxies
multiparams and fields
chaining
mapping to extjs objects
extjs grid interop
extjs grid interop

   associated with grid component
js proxies in page objects


page objects may be bound to JS
      proxy by interface

 js proxy serves as javascript
        logic adapter
js proxies in page objects




 bound automatically
 by method return type   1:1 mapping between
                           page object and
                               js proxy
js proxies      good part

map by interface, abstract class
or through fully dynamic proxy
link external js source
supports field access and call
chaining
very powerful if you
 know how to use it
js proxies       beware!


performance impact

do not overuse

hide behind page objects to
keep reusability
special credit to
                                       http://www.vladstudio.com




THANKS.                  FOR YOUR ATTENTION




      FLUSHDIA@gmail.com
  https://twitter.com/flushdia
references
http://www.extremeprogramming.org/rules/functionaltests.html


                        http://seleniumhq.org/
                        http://code.google.com/p/selenium/


                        http://thucydides-webtests.com/
                        http://thucydides.wakaleo.com/
                        http://www.thucydides.info
references

  http://arquillian.org/blog/tags/graphene/



  http://testng.org/doc/index.html



  http://groovy.codehaus.org/

More Related Content

What's hot (20)

PDF
Test and Behaviour Driven Development (TDD/BDD)
Lars Thorup
 
PPTX
DSL, Page Object and WebDriver – the path to reliable functional tests.pptx
Mikalai Alimenkou
 
PDF
Getting Started with Selenium
Dave Haeffner
 
PDF
How To Use Selenium Successfully
Dave Haeffner
 
PDF
Mastering Test Automation: How to Use Selenium Successfully
Applitools
 
PDF
[Webinar] Continuous Testing Done Right: Test Automation at the World's Leadi...
Applitools
 
PDF
Better Page Object Handling with Loadable Component Pattern
Sargis Sargsyan
 
PPT
Testing Java Web Apps With Selenium
Marakana Inc.
 
PDF
Automated Testing in Angular Slides
Jim Lynch
 
PPTX
Automated Acceptance Tests in .NET
Wyn B. Van Devanter
 
PPTX
Selenium Training | TestNG Framework For Selenium | Selenium Tutorial For Beg...
Edureka!
 
DOCX
Automation Frame works Instruction Sheet
vodQA
 
PPTX
TGT#13 - UI Tests Automation Framework in Evolve EDM – Case Study - Mateusz R...
Trójmiejska Grupa Testerska
 
PPTX
Marcin Wasilczyk - Page objects with selenium
Trójmiejska Grupa Testerska
 
PDF
How To Use Selenium Successfully
Dave Haeffner
 
PDF
TestingAR XX - Protractor e2e Test Framework - Introduction what we have lear...
TestingAR Meetup
 
PPTX
Colorful world-of-visual-automation-testing-latest
Onur Baskirt
 
PDF
Carmen Popoviciu - Protractor styleguide | Codemotion Milan 2015
Codemotion
 
PDF
Using The Page Object Pattern
Dante Briones
 
PDF
Selenium course training institute ameerpet hyderabad – Best software trainin...
Sathya Technologies
 
Test and Behaviour Driven Development (TDD/BDD)
Lars Thorup
 
DSL, Page Object and WebDriver – the path to reliable functional tests.pptx
Mikalai Alimenkou
 
Getting Started with Selenium
Dave Haeffner
 
How To Use Selenium Successfully
Dave Haeffner
 
Mastering Test Automation: How to Use Selenium Successfully
Applitools
 
[Webinar] Continuous Testing Done Right: Test Automation at the World's Leadi...
Applitools
 
Better Page Object Handling with Loadable Component Pattern
Sargis Sargsyan
 
Testing Java Web Apps With Selenium
Marakana Inc.
 
Automated Testing in Angular Slides
Jim Lynch
 
Automated Acceptance Tests in .NET
Wyn B. Van Devanter
 
Selenium Training | TestNG Framework For Selenium | Selenium Tutorial For Beg...
Edureka!
 
Automation Frame works Instruction Sheet
vodQA
 
TGT#13 - UI Tests Automation Framework in Evolve EDM – Case Study - Mateusz R...
Trójmiejska Grupa Testerska
 
Marcin Wasilczyk - Page objects with selenium
Trójmiejska Grupa Testerska
 
How To Use Selenium Successfully
Dave Haeffner
 
TestingAR XX - Protractor e2e Test Framework - Introduction what we have lear...
TestingAR Meetup
 
Colorful world-of-visual-automation-testing-latest
Onur Baskirt
 
Carmen Popoviciu - Protractor styleguide | Codemotion Milan 2015
Codemotion
 
Using The Page Object Pattern
Dante Briones
 
Selenium course training institute ameerpet hyderabad – Best software trainin...
Sathya Technologies
 

Similar to Acceptance Testing of Web UI (20)

PDF
Automation strategies for agile testing Gaurav bansal
India Scrum Enthusiasts Community
 
PDF
Implementing Test Automation in Agile Projects
Dominik Dary
 
PPTX
Selenium conference 2012 - One Step At A Time
Anand Ramdeo
 
PDF
Web Test Automation Framework - IndicThreads Conference
IndicThreads
 
PDF
BDD, ATDD, Page Objects: The Road to Sustainable Web Testing
John Ferguson Smart Limited
 
PPT
Stepin evening presented
Vijayan Reddy
 
PPTX
Automated integration tests for ajax applications (с. карпушин, auriga)
Mobile Developer Day
 
PPTX
Implementing Test Automation in Agile Projects
Michael Palotas
 
PPT
Test Automation Framework Designs
Test Automaton
 
PPT
Test Automation Framework Designs
Sauce Labs
 
PPTX
Selenium Camp 2012
Yan Alexeenko
 
PPTX
Agile Testing at eBay
Dominik Dary
 
PPTX
Automation solution using jbehave, selenium and hudson
Pankaj Nakhat
 
PDF
Webapp acceptance testing a case study
ekantola
 
PDF
Performance - a challenging craft
Fabian Lange
 
PPTX
DSL, Page Object и WebDriver – путь к надежным функциональным тестам
SQALab
 
PDF
BDD approaches for web development at Agile Testing Days 2009
Thomas Lundström
 
PDF
SVCC 2011 - 0 - 60: QA Automation @ Box
Peter White
 
PDF
How the JDeveloper team test JDeveloper at UKOUG'08
kingsfleet
 
PPTX
4&5.pptx SOFTWARE TESTING UNIT-4 AND UNIT-5
hemasubbu08
 
Automation strategies for agile testing Gaurav bansal
India Scrum Enthusiasts Community
 
Implementing Test Automation in Agile Projects
Dominik Dary
 
Selenium conference 2012 - One Step At A Time
Anand Ramdeo
 
Web Test Automation Framework - IndicThreads Conference
IndicThreads
 
BDD, ATDD, Page Objects: The Road to Sustainable Web Testing
John Ferguson Smart Limited
 
Stepin evening presented
Vijayan Reddy
 
Automated integration tests for ajax applications (с. карпушин, auriga)
Mobile Developer Day
 
Implementing Test Automation in Agile Projects
Michael Palotas
 
Test Automation Framework Designs
Test Automaton
 
Test Automation Framework Designs
Sauce Labs
 
Selenium Camp 2012
Yan Alexeenko
 
Agile Testing at eBay
Dominik Dary
 
Automation solution using jbehave, selenium and hudson
Pankaj Nakhat
 
Webapp acceptance testing a case study
ekantola
 
Performance - a challenging craft
Fabian Lange
 
DSL, Page Object и WebDriver – путь к надежным функциональным тестам
SQALab
 
BDD approaches for web development at Agile Testing Days 2009
Thomas Lundström
 
SVCC 2011 - 0 - 60: QA Automation @ Box
Peter White
 
How the JDeveloper team test JDeveloper at UKOUG'08
kingsfleet
 
4&5.pptx SOFTWARE TESTING UNIT-4 AND UNIT-5
hemasubbu08
 
Ad

More from Vladimir Tsukur (12)

PDF
GraphQL APIs in Scala with Sangria
Vladimir Tsukur
 
PDF
GraphQL - APIs The New Way
Vladimir Tsukur
 
PDF
Hypermedia APIs and HATEOAS / Wix Engineering
Vladimir Tsukur
 
PDF
Hypermedia APIs and HATEOAS
Vladimir Tsukur
 
PDF
Hot and spicy Java with Lombok. Live!
Vladimir Tsukur
 
PDF
Building Awesome API with Spring
Vladimir Tsukur
 
PDF
From CRUD to Hypermedia APIs with Spring
Vladimir Tsukur
 
PDF
Together Cheerfully to Walk with Hypermedia
Vladimir Tsukur
 
PDF
Take a REST!
Vladimir Tsukur
 
PDF
Law of Demeter & Objective Sense of Style
Vladimir Tsukur
 
PDF
Abstraction Classes in Software Design
Vladimir Tsukur
 
KEY
REpresentational State Transfer
Vladimir Tsukur
 
GraphQL APIs in Scala with Sangria
Vladimir Tsukur
 
GraphQL - APIs The New Way
Vladimir Tsukur
 
Hypermedia APIs and HATEOAS / Wix Engineering
Vladimir Tsukur
 
Hypermedia APIs and HATEOAS
Vladimir Tsukur
 
Hot and spicy Java with Lombok. Live!
Vladimir Tsukur
 
Building Awesome API with Spring
Vladimir Tsukur
 
From CRUD to Hypermedia APIs with Spring
Vladimir Tsukur
 
Together Cheerfully to Walk with Hypermedia
Vladimir Tsukur
 
Take a REST!
Vladimir Tsukur
 
Law of Demeter & Objective Sense of Style
Vladimir Tsukur
 
Abstraction Classes in Software Design
Vladimir Tsukur
 
REpresentational State Transfer
Vladimir Tsukur
 
Ad

Recently uploaded (20)

PPTX
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PPT
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
DOCX
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
PDF
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PPTX
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
PDF
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
PDF
Staying Human in a Machine- Accelerated World
Catalin Jora
 
PDF
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
PDF
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
Staying Human in a Machine- Accelerated World
Catalin Jora
 
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 

Acceptance Testing of Web UI