SlideShare uma empresa Scribd logo
1 de 70
Testing Ajax Applications
SPA 2009




© 2009 CAPLIN SYSTEMS
Testing AJAX Applications


INTRODUCTIONS


                            2
© 2009 CAPLIN SYSTEMS
Who we are

 Patrick Myles
         Head of Engineering, Caplin Systems


 Andrew MacLeod
         JavaScript Architect, Caplin Systems




                                                3
© 2009 CAPLIN SYSTEMS
How this talk came about
 We have a big Ajax application
 We use Agile
 We needed a way to test each release

             This is the overview we wish
                we’d had 2 years ago



                                            4
© 2009 CAPLIN SYSTEMS
This is not a Selenium HOWTO
 Just enough Selenium to:
     understand the grammar
     promote a discussion on frameworks
     see how good Selenium is!
 Not enough Selenium to:
     lose non-programmers (e.g. QA engineers)
     get bogged down in Selenium nuts-and-bolts
     see how frustrating Selenium is!

                                                   5
© 2009 CAPLIN SYSTEMS
Frustration

       Browsers were never designed as
        platforms for automated tests...



        ...so browser test tools are a hack!



                                               6
© 2009 CAPLIN SYSTEMS
We would like you to leave with...
 Confidence
     automated testing
     hands-on experience
 Ideas
       designing tests
       tool selection
       building a framework
       planning a test programme

                                     7
© 2009 CAPLIN SYSTEMS
Testing AJAX Applications


THE PROBLEM


                            8
© 2009 CAPLIN SYSTEMS
The Problem
 How can we ensure that each release of
  our application works everywhere?




                                           9
© 2009 CAPLIN SYSTEMS
Manual Testing




                                               DOM
       Test                                           Browser
       Pack                                          Application




                               Tester
                        (acting as the User)


 Repeat for each new feature
 Repeat for all supported platforms .
                                                                   10
© 2009 CAPLIN SYSTEMS
Automated Testing




                                               DOM
       Test                                           Browser
       Script                                        Application


                               Robot
                        (acting as the User)


 How intelligent is the robot?
 How human readable is the script?
 How much effort does the robot consume?                               .

                                                                   11
© 2009 CAPLIN SYSTEMS
Tools
        Test                                           Behaviour Driven
                                         FIT
                           Fitnesse
        Framework                                      Development
COM
                                    Cucumber
                   WebTest
browser control                                              Domain Specific
                                    rspec                    Language (DSL)
                         Watir
       Selenium                                  hamcrest
                            TestNG
      WebDriver
       Mercury                                                   JSUnit
                                                      HttpUnit
                            WindowLicker
         Windmill
                              Auto-Hotkey             LoadRunner
   DOM
   browser control
                                 Screen coordinates
                                                                          12
 © 2009 CAPLIN SYSTEMS
Workshop

   Why are browser applications
       so difficult to test?




                                  13
© 2009 CAPLIN SYSTEMS
Testing AJAX Applications


CAPLIN: 5 MINUTE CASE STUDY


                            14
© 2009 CAPLIN SYSTEMS
Caplin Trader
 Quick demonstration
Caplin’s Timeline
                      2007                              2008                     2009
Scope




                                 Smoke Test (continuous integration)
                                           Functional Tests (nightly)
                                                                    Performance Tests
Authors Apps




                                     Reference Implementation
                               Bespoke Implementations (up to 3 in parallel)

                                            Development
                                                                        QA
Framework




                 Selenium Framework v1             Selenium Framework v2

                                                                                        16
       © 2009 CAPLIN SYSTEMS
Our first test...
... a more recent test

goal: Use product finder portlet
do Login (${username}=”user1quot;, ${password}=quot;testerquot;)
do CreateNewLayout
do Insert (${portlet}=“Product Finder”)
do AssertPortletPresent (${portlet}=“Product Finder”)
do Logout
Testing AJAX Applications

EXERCISE 1:
SELENIUM IDE: SEND AN EMAIL

                              19
© 2009 CAPLIN SYSTEMS
Objective
   To get familiar with the Selenium IDE
   To produce a simple test script
   To review the script afterwards
   Experience some Ajax testing pitfalls
Schema

         interact


record




          playback
User Story
“As a user,
 I want to send an e-mail message
 so that I can stay in touch with my friend”




                                               22
© 2009 CAPLIN SYSTEMS
Golden Rule


Put yourself in the user’s position


   write the test first
   watch it fail
   fix it

                                  23
© 2009 CAPLIN SYSTEMS
Tools: Firefox Add-ons
 Firefox Selenium IDE
     easy authoring tool
 Firebug debugger
     reverse engineering tool
 XPather
     locates UI elements




                                 24
© 2009 CAPLIN SYSTEMS
Demo
 Open Firefox IDE
     Record
     Save
     Playback




                        25
© 2009 CAPLIN SYSTEMS
Setup…
 Disconnect from LAN
 Connect to CaplinSpa2009 wireless
  network
 Plug USB key
 Open Firefox + Selenium IDE
 (set ?:Examplesuser-extensions.js)
 Navigate to http://spa2009.com/webmail


                                       26
© 2009 CAPLIN SYSTEMS
Your Turn…
 Login:
     user: spa1
     password: caplin2009
 Send mail To: patrick@spa2009.com
 Insert appropriate actions:
     pause
     waitForElementPresent
     waitForEditable
 Save in /Exercise1-Basic/

                                      27
© 2009 CAPLIN SYSTEMS
Selenium IDE Review
               Pros                          Cons
                               
    easy to set up                  no explicit verification
                               
    easy to write                   locators are unintelligible
                               
    easy to run                     brittle
                               
    little Selenium knowledge       unstructured
    required                       desktop orientated
   generates code!                feature must exist




                                                                  28
© 2009 CAPLIN SYSTEMS
Testing AJAX Applications


SELENIUM: 5 MINUTE TUTORIAL


                            29
© 2009 CAPLIN SYSTEMS
Selenium Test Script

One step
per line...




                     action   thing to    optional
                               act on    argument

                                                     30
  © 2009 CAPLIN SYSTEMS
Actions


 Selenium
   Selenium.prototype.doType(sInputLocator, sInputText)
   Selenium.prototype.doClick(sLocator)


 Custom Framework
   Selenium.prototype.doClickControl(sLocator)




                                                          31
© 2009 CAPLIN SYSTEMS
Locators


 Selenium
   xpath
   id
   link
   ...

 Custom Framework
   PageBot.prototype.locateElementByMenuBarItem(sLocatorText, oDocument)




                                                                           32
© 2009 CAPLIN SYSTEMS
Accessors


 Selenium
    waitFor
      store     ElementPresent
     assert
     verify
  Selenium.prototype.isElementPresent(sLocator)


 Custom
    waitFor
      store
                MessageCount
     assert
     verify
  Selenium.prototype.getMessageCount(sLocator)

                                                  33
© 2009 CAPLIN SYSTEMS
Testing AJAX Applications


SCRIPTS:
INTERPRETERS AND RUNNERS

                            34
© 2009 CAPLIN SYSTEMS
Script: Machine vs. Human readable




                                    Pianola
                               (acting as pianist)



                  Piano Roll

                                                35
© 2009 CAPLIN SYSTEMS
After the break...
Linguistic                  Application
Constructs                  Abstractions
                            • locator
                              strategies
• structure
                            • application
• functions
                              operations
• control flow
                            • state
                              transitions


                                                  DOM
   Source                                              Browser
                 compiler    Interpreter Runner
    Code                                          COM Application




                                                                36
© 2009 CAPLIN SYSTEMS
Testing AJAX Applications


COFFEE BREAK (10 MINUTES)


                            37
© 2009 CAPLIN SYSTEMS
Design Principles
Testing Ajax applications




                            38
© 2009 CAPLIN SYSTEMS
Design Principles
 Domain Hierarchies
     how to make my tests more readable?
     modeling vs. maintainability?
     how can I isolate application changes?
 Test structure and composition
     how do I avoid duplication?
     how do my tests map to my requirements?
     how can I make my framework scalable?

                                                39
© 2009 CAPLIN SYSTEMS
Testing AJAX Applications


DOMAIN HIERARCHIES


                            40
© 2009 CAPLIN SYSTEMS
?
                                                                     Test framework


                              Verification Domain
                               (Locate, input, verify, etc.)


                                                                    Test tool


                                Browser Domain
                              (DOM, text nodes, clicks, etc.)


                                                                   Application

                                 System Domain
                        (OO language, may model business domain)



                                                                                 41
© 2009 CAPLIN SYSTEMS
What to use for framework domain?
1. Don’t bother! ...




                                42
© 2009 CAPLIN SYSTEMS
?
                                                                     Test framework


                              Verification Domain                    Test framework
                               (Locate, input, verify, etc.)


                                                                    Test tool


                                Browser Domain
                              (DOM, text nodes, clicks, etc.)


                                                                   Application

                                 System Domain
                        (OO language, may model business domain)



                                                                                 43
© 2009 CAPLIN SYSTEMS
What to use for framework domain?
1. Don’t bother...
      Quick to get going
      Can use off-the-shelf tools (e.g. Selenium
      IDE)
      Lots of duplication in tests
      Maintenance nightmare
      Brittle tests
      Rapidly become hard to read and author

                                                   44
© 2009 CAPLIN SYSTEMS
What to use for framework domain?
2. Mirror of system domain...




                                45
© 2009 CAPLIN SYSTEMS
??
                            System Domain (again)

                                                                     Test framework


                              Verification Domain
                               (Locate, input, verify, etc.)


                                                                    Test tool


                                Browser Domain
                              (DOM, text nodes, clicks, etc.)


                                                                   Application

                                 System Domain
                        (OO language, may model business domain)



                                                                                 46
© 2009 CAPLIN SYSTEMS
What to use for framework domain?
2. Mirror of system domain...
      Usually in same language as System
      Seems attractive – particularly if System is
      well modelled on problem domain
      Can “share” domain objects
      Often ends up with either tight coupling...
      ...or duplicated code / abstractions on both
      sides of the Browser/Verification divide
      Using same language as System doesn’t
      reinforce the domain separation
                                                     47
© 2009 CAPLIN SYSTEMS
What to use for framework domain?
3. Model or DSL that reinforces user’s
   interactions and use-cases...




                                         48
© 2009 CAPLIN SYSTEMS
?
                        Business (User) Domain / DSL
                         (Inbox, compose, check mail, logout, etc.)


                                                                        Test framework


                              Verification Domain
                               (Locate, input, verify, etc.)


                                                                       Test tool


                                Browser Domain
                              (DOM, text nodes, clicks, etc.)


                                                                      Application

                                 System Domain
                        (OO language, may model business domain)



                                                                                    49
© 2009 CAPLIN SYSTEMS
What to use for framework domain?
3. Model or DSL that reinforces user’s
   interactions and use-cases...
      Easier to understand for non-programmers
      Less brittle when underlying domains change
      More natural abstractions
      Requires more maintenance of different
      abstractions
      Can make it hard to implement complex
      interactions
                                                    50
© 2009 CAPLIN SYSTEMS
Testing AJAX Applications


EXERCISE 2:
USING A FRAMEWORK

                            51
© 2009 CAPLIN SYSTEMS
Objectives
 Move test script closer to application domain
    Introduce logical names for screen controls
    Remove physical references to screen controls
 Show Selenium extensions
 Make tests more readable




                                                 52
 © 2009 CAPLIN SYSTEMS
Selenium Framework
                        Application
                        Abstractions


                        • actions

                        • locators




                                                DOM
    Source                                             Browser
                         Interpreter   Runner
     Code                                             Application
                                                COM




                                                                    53
© 2009 CAPLIN SYSTEMS
Exercise 2 - Framework
 Demo




                         54
© 2009 CAPLIN SYSTEMS
Testing AJAX Applications


UCD TEST STRUCTURE


                            55
© 2009 CAPLIN SYSTEMS
User Centered Design (UCD)
 A powerful way to model and design a
  system
 Like Agile, focuses on Users – their needs
  and goals
 Typically used for UI/UX design, but
  provides great models for test frameworks

 We use with a simple text DSL
                                           56
© 2009 CAPLIN SYSTEMS
User Centered Design (UCD)
 Brings focus back to users and their
     Goals
     Tasks
        • Actions
 Fits well with user story structure:
                    As a [type of user]
             I want to [a task or sequence of tasks]
       so that I can [achieve some goal]
                                                       57
© 2009 CAPLIN SYSTEMS
Use-Cases and UCD

                        UCD concepts map
                        well to use-case
                        levels


                          Goal
                          Task
                          Action
                                       58
© 2009 CAPLIN SYSTEMS
Story Structure
                         Tasks
          Goal                         Actions
        Send Email       Login          Action

                                        Action

                        Send Message    Action

                                        Action

                                        Action




                         Logout        Action

                                       Action
                                                 59
© 2009 CAPLIN SYSTEMS
Testing AJAX Applications


EXERCISE 3:
RUNNING A UCD TEST

                            60
© 2009 CAPLIN SYSTEMS
Objectives
 Demonstrate UCD structure
 Show task re-use
 Implement a new task




                              61
© 2009 CAPLIN SYSTEMS
Old Structure

          Test          Action

                        Action

                        Action

                        Action

                        Action

                        Action

                        Action

                        Action


                                 62
© 2009 CAPLIN SYSTEMS
UCD Structure
         Goal           Task   Action

                               Action

                        Task   Action

                               Action

                               Action




                        Task   Action

                               Action

                                        63
© 2009 CAPLIN SYSTEMS
Demonstration
 Goal/Task/Action hierarchy
 Task level convenient for
     Reuse
     Maintenance
     Communication
 Action level too small to be reusable



                                          64
© 2009 CAPLIN SYSTEMS
UCD Structure
        Send Email       Login         Action

                                       Action

                        Send Message   Action

                                       Action

                                       Action

                         Verify Sent   Action

                                       Action

                         Logout        Action

                                       Action

                                                65
© 2009 CAPLIN SYSTEMS
A new story…
“As a user,
 I want to receive an email
 so that I can prove I have a friend!”




                                         66
© 2009 CAPLIN SYSTEMS
Your Turn...
       Receive Email    Login          Action

                                       Action




                                       Action
                        Verify Inbox
                        non-empty
                                       Action




                        Logout         Action

                                       Action

                                                67
© 2009 CAPLIN SYSTEMS
Testing AJAX Applications


SUMMARY


                            68
© 2009 CAPLIN SYSTEMS
Summary
 Selenium is not a perfect testing tool, but…
 Selenium extensions are effective
   actions
   locators
   accessors
 UCD is a good way to structure test cases
   goals
   tasks
   actions
Taking things forward…
 Develop a simple DSL for testers to use
   invoke tasks with parameters
   get rid of ugly HTML “Selenese”
   use a PATH mechanism to locate tasks

-- goal: use product finder portlet
do Login (${username}=”user1quot;, ${password}=quot;testerquot;)
do CreateNewLayout
do Insert (${portlet}=“Product Finder”)
do AssertPortletPresent (${portlet}=“Product Finder”)
do Logout

Mais conteúdo relacionado

Mais procurados

SVCC 2011 - 0 - 60: QA Automation @ Box
SVCC 2011 - 0 - 60: QA Automation @ BoxSVCC 2011 - 0 - 60: QA Automation @ Box
SVCC 2011 - 0 - 60: QA Automation @ BoxPeter White
 
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
 
[ApacheCon 2016] Advanced Apache Cordova
[ApacheCon 2016] Advanced Apache Cordova[ApacheCon 2016] Advanced Apache Cordova
[ApacheCon 2016] Advanced Apache CordovaHazem Saleh
 
API Testing following the Test Pyramid
API Testing following the Test PyramidAPI Testing following the Test Pyramid
API Testing following the Test PyramidElias Nogueira
 
Deploy continuo com jenkins, codeception e zend server
Deploy continuo com jenkins, codeception e zend serverDeploy continuo com jenkins, codeception e zend server
Deploy continuo com jenkins, codeception e zend serverWilliam Felipe
 
JavaOne 2015 - Swimming upstream in the container revolution
JavaOne 2015 - Swimming upstream in the container revolutionJavaOne 2015 - Swimming upstream in the container revolution
JavaOne 2015 - Swimming upstream in the container revolutionBert Jan Schrijver
 
PowerPoint Presentation
PowerPoint PresentationPowerPoint Presentation
PowerPoint Presentationrhofkens
 
New Generation Record/Playback Tools for AJAX Testing
New Generation Record/Playback Tools for AJAX TestingNew Generation Record/Playback Tools for AJAX Testing
New Generation Record/Playback Tools for AJAX TestingClever Moe
 
Take Your XPages Development to the Next Level
Take Your XPages Development to the Next LevelTake Your XPages Development to the Next Level
Take Your XPages Development to the Next Levelbalassaitis
 
081107 Sammy Eclipse Summit2
081107   Sammy   Eclipse Summit2081107   Sammy   Eclipse Summit2
081107 Sammy Eclipse Summit2mkempka
 
Apache Cordova In Action
Apache Cordova In ActionApache Cordova In Action
Apache Cordova In ActionHazem Saleh
 
Alliance Successful Selenium Automation
Alliance Successful Selenium AutomationAlliance Successful Selenium Automation
Alliance Successful Selenium Automationsadams22
 
Continuous Delivery Overview
Continuous Delivery OverviewContinuous Delivery Overview
Continuous Delivery OverviewWill Iverson
 
Parallel run selenium tests in a good way
Parallel run selenium tests in a good  wayParallel run selenium tests in a good  way
Parallel run selenium tests in a good wayCOMAQA.BY
 
Test Automation With Cucumber JVM, Selenium, and Mocha
Test Automation With Cucumber JVM, Selenium, and MochaTest Automation With Cucumber JVM, Selenium, and Mocha
Test Automation With Cucumber JVM, Selenium, and MochaSalesforce Developers
 
JMP401: Masterclass: XPages Scalability
JMP401: Masterclass: XPages ScalabilityJMP401: Masterclass: XPages Scalability
JMP401: Masterclass: XPages ScalabilityTony McGuckin
 
Agile Open Source Performance Testing Workshop for Business Managers
Agile Open Source Performance Testing Workshop for Business ManagersAgile Open Source Performance Testing Workshop for Business Managers
Agile Open Source Performance Testing Workshop for Business ManagersClever Moe
 
[Devoxx Morocco 2015] Apache Cordova In Action
[Devoxx Morocco 2015] Apache Cordova In Action[Devoxx Morocco 2015] Apache Cordova In Action
[Devoxx Morocco 2015] Apache Cordova In ActionHazem Saleh
 
Performance Tuning: Pulling a Rabbit From a Hat - Atlassian Summit 2010
Performance Tuning: Pulling a Rabbit From a Hat - Atlassian Summit 2010Performance Tuning: Pulling a Rabbit From a Hat - Atlassian Summit 2010
Performance Tuning: Pulling a Rabbit From a Hat - Atlassian Summit 2010Atlassian
 

Mais procurados (20)

SVCC 2011 - 0 - 60: QA Automation @ Box
SVCC 2011 - 0 - 60: QA Automation @ BoxSVCC 2011 - 0 - 60: QA Automation @ Box
SVCC 2011 - 0 - 60: QA Automation @ Box
 
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
 
[ApacheCon 2016] Advanced Apache Cordova
[ApacheCon 2016] Advanced Apache Cordova[ApacheCon 2016] Advanced Apache Cordova
[ApacheCon 2016] Advanced Apache Cordova
 
API Testing following the Test Pyramid
API Testing following the Test PyramidAPI Testing following the Test Pyramid
API Testing following the Test Pyramid
 
Deploy continuo com jenkins, codeception e zend server
Deploy continuo com jenkins, codeception e zend serverDeploy continuo com jenkins, codeception e zend server
Deploy continuo com jenkins, codeception e zend server
 
JavaOne 2015 - Swimming upstream in the container revolution
JavaOne 2015 - Swimming upstream in the container revolutionJavaOne 2015 - Swimming upstream in the container revolution
JavaOne 2015 - Swimming upstream in the container revolution
 
PowerPoint Presentation
PowerPoint PresentationPowerPoint Presentation
PowerPoint Presentation
 
New Generation Record/Playback Tools for AJAX Testing
New Generation Record/Playback Tools for AJAX TestingNew Generation Record/Playback Tools for AJAX Testing
New Generation Record/Playback Tools for AJAX Testing
 
JavaFX Overview
JavaFX OverviewJavaFX Overview
JavaFX Overview
 
Take Your XPages Development to the Next Level
Take Your XPages Development to the Next LevelTake Your XPages Development to the Next Level
Take Your XPages Development to the Next Level
 
081107 Sammy Eclipse Summit2
081107   Sammy   Eclipse Summit2081107   Sammy   Eclipse Summit2
081107 Sammy Eclipse Summit2
 
Apache Cordova In Action
Apache Cordova In ActionApache Cordova In Action
Apache Cordova In Action
 
Alliance Successful Selenium Automation
Alliance Successful Selenium AutomationAlliance Successful Selenium Automation
Alliance Successful Selenium Automation
 
Continuous Delivery Overview
Continuous Delivery OverviewContinuous Delivery Overview
Continuous Delivery Overview
 
Parallel run selenium tests in a good way
Parallel run selenium tests in a good  wayParallel run selenium tests in a good  way
Parallel run selenium tests in a good way
 
Test Automation With Cucumber JVM, Selenium, and Mocha
Test Automation With Cucumber JVM, Selenium, and MochaTest Automation With Cucumber JVM, Selenium, and Mocha
Test Automation With Cucumber JVM, Selenium, and Mocha
 
JMP401: Masterclass: XPages Scalability
JMP401: Masterclass: XPages ScalabilityJMP401: Masterclass: XPages Scalability
JMP401: Masterclass: XPages Scalability
 
Agile Open Source Performance Testing Workshop for Business Managers
Agile Open Source Performance Testing Workshop for Business ManagersAgile Open Source Performance Testing Workshop for Business Managers
Agile Open Source Performance Testing Workshop for Business Managers
 
[Devoxx Morocco 2015] Apache Cordova In Action
[Devoxx Morocco 2015] Apache Cordova In Action[Devoxx Morocco 2015] Apache Cordova In Action
[Devoxx Morocco 2015] Apache Cordova In Action
 
Performance Tuning: Pulling a Rabbit From a Hat - Atlassian Summit 2010
Performance Tuning: Pulling a Rabbit From a Hat - Atlassian Summit 2010Performance Tuning: Pulling a Rabbit From a Hat - Atlassian Summit 2010
Performance Tuning: Pulling a Rabbit From a Hat - Atlassian Summit 2010
 

Destaque

WebApp / SPA @ AllFacebook Developer Conference
WebApp / SPA @ AllFacebook Developer ConferenceWebApp / SPA @ AllFacebook Developer Conference
WebApp / SPA @ AllFacebook Developer ConferenceAllFacebook.de
 
Intro to SPA using JavaScript & ASP.NET
Intro to SPA using JavaScript & ASP.NETIntro to SPA using JavaScript & ASP.NET
Intro to SPA using JavaScript & ASP.NETAlan Hecht
 
Writing SPA in 2017
Writing SPA in 2017Writing SPA in 2017
Writing SPA in 2017Arek Flinik
 
Building Applications Using Ajax
Building Applications Using AjaxBuilding Applications Using Ajax
Building Applications Using Ajaxs_pradeep
 
Webinar on Angular JS titled 'Develop Responsive Single Page Application'
Webinar on Angular JS titled 'Develop Responsive Single Page Application'Webinar on Angular JS titled 'Develop Responsive Single Page Application'
Webinar on Angular JS titled 'Develop Responsive Single Page Application'Edureka!
 
Single page application
Single page applicationSingle page application
Single page applicationJeremy Lee
 
Ajax Introduction Presentation
Ajax   Introduction   PresentationAjax   Introduction   Presentation
Ajax Introduction Presentationthinkphp
 
An Introduction to Ajax Programming
An Introduction to Ajax ProgrammingAn Introduction to Ajax Programming
An Introduction to Ajax Programminghchen1
 
Single Page Application presentation
Single Page Application presentationSingle Page Application presentation
Single Page Application presentationJohn Staveley
 
Introduction to ajax
Introduction to ajaxIntroduction to ajax
Introduction to ajaxNir Elbaz
 
Ajax ppt - 32 slides
Ajax ppt - 32 slidesAjax ppt - 32 slides
Ajax ppt - 32 slidesSmithss25
 
The Majlis – one of the best Kenya Hotels Offers Different Watersports Activi...
The Majlis – one of the best Kenya Hotels Offers Different Watersports Activi...The Majlis – one of the best Kenya Hotels Offers Different Watersports Activi...
The Majlis – one of the best Kenya Hotels Offers Different Watersports Activi...Frank William
 
GARDEN STONES & BASICS, de BASIS voor IEDERE TUIN - www.gsbsierbestrating.nl
GARDEN STONES & BASICS, de BASIS voor IEDERE TUIN - www.gsbsierbestrating.nlGARDEN STONES & BASICS, de BASIS voor IEDERE TUIN - www.gsbsierbestrating.nl
GARDEN STONES & BASICS, de BASIS voor IEDERE TUIN - www.gsbsierbestrating.nlGarden Stones & Basics
 
Mrs. Rudd's Class - Leaf Creatures
Mrs. Rudd's Class - Leaf CreaturesMrs. Rudd's Class - Leaf Creatures
Mrs. Rudd's Class - Leaf CreaturesJennifer McMahon
 
Thao luan ke toan quoc te
Thao luan ke toan quoc teThao luan ke toan quoc te
Thao luan ke toan quoc teĐiệp Koj
 

Destaque (20)

WebApp / SPA @ AllFacebook Developer Conference
WebApp / SPA @ AllFacebook Developer ConferenceWebApp / SPA @ AllFacebook Developer Conference
WebApp / SPA @ AllFacebook Developer Conference
 
Intro to SPA using JavaScript & ASP.NET
Intro to SPA using JavaScript & ASP.NETIntro to SPA using JavaScript & ASP.NET
Intro to SPA using JavaScript & ASP.NET
 
Writing SPA in 2017
Writing SPA in 2017Writing SPA in 2017
Writing SPA in 2017
 
Building Applications Using Ajax
Building Applications Using AjaxBuilding Applications Using Ajax
Building Applications Using Ajax
 
Webinar on Angular JS titled 'Develop Responsive Single Page Application'
Webinar on Angular JS titled 'Develop Responsive Single Page Application'Webinar on Angular JS titled 'Develop Responsive Single Page Application'
Webinar on Angular JS titled 'Develop Responsive Single Page Application'
 
Ajax presentation
Ajax presentationAjax presentation
Ajax presentation
 
Single page application
Single page applicationSingle page application
Single page application
 
Ajax Introduction Presentation
Ajax   Introduction   PresentationAjax   Introduction   Presentation
Ajax Introduction Presentation
 
Single page application
Single page applicationSingle page application
Single page application
 
An Introduction to Ajax Programming
An Introduction to Ajax ProgrammingAn Introduction to Ajax Programming
An Introduction to Ajax Programming
 
Single Page Application presentation
Single Page Application presentationSingle Page Application presentation
Single Page Application presentation
 
Ajax Ppt
Ajax PptAjax Ppt
Ajax Ppt
 
Introduction to ajax
Introduction to ajaxIntroduction to ajax
Introduction to ajax
 
Ajax ppt - 32 slides
Ajax ppt - 32 slidesAjax ppt - 32 slides
Ajax ppt - 32 slides
 
Power point
Power pointPower point
Power point
 
The Majlis – one of the best Kenya Hotels Offers Different Watersports Activi...
The Majlis – one of the best Kenya Hotels Offers Different Watersports Activi...The Majlis – one of the best Kenya Hotels Offers Different Watersports Activi...
The Majlis – one of the best Kenya Hotels Offers Different Watersports Activi...
 
GARDEN STONES & BASICS, de BASIS voor IEDERE TUIN - www.gsbsierbestrating.nl
GARDEN STONES & BASICS, de BASIS voor IEDERE TUIN - www.gsbsierbestrating.nlGARDEN STONES & BASICS, de BASIS voor IEDERE TUIN - www.gsbsierbestrating.nl
GARDEN STONES & BASICS, de BASIS voor IEDERE TUIN - www.gsbsierbestrating.nl
 
Fen 5 (sozluk)
Fen 5 (sozluk)Fen 5 (sozluk)
Fen 5 (sozluk)
 
Mrs. Rudd's Class - Leaf Creatures
Mrs. Rudd's Class - Leaf CreaturesMrs. Rudd's Class - Leaf Creatures
Mrs. Rudd's Class - Leaf Creatures
 
Thao luan ke toan quoc te
Thao luan ke toan quoc teThao luan ke toan quoc te
Thao luan ke toan quoc te
 

Semelhante a SPA 2009 - Acceptance Testing AJAX Web Applications through the GUI

Selenium Basics Tutorial
Selenium Basics TutorialSelenium Basics Tutorial
Selenium Basics TutorialClever Moe
 
Cloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
Cloud-powered Continuous Integration and Deployment architectures - Jinesh VariaCloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
Cloud-powered Continuous Integration and Deployment architectures - Jinesh VariaAmazon Web Services
 
UI Testing Automation - Alex Kalinovsky - CreamTec LLC
UI Testing Automation - Alex Kalinovsky - CreamTec LLCUI Testing Automation - Alex Kalinovsky - CreamTec LLC
UI Testing Automation - Alex Kalinovsky - CreamTec LLCJim Lane
 
Migrating From HP QTP To TestMaker 6
Migrating From HP QTP To TestMaker 6Migrating From HP QTP To TestMaker 6
Migrating From HP QTP To TestMaker 6Clever Moe
 
Постоянное тестирование интеграции
Постоянное тестирование интеграцииПостоянное тестирование интеграции
Постоянное тестирование интеграцииSQALab
 
Growing Trends of Open Source UI Frameworks
Growing Trends of Open Source UI FrameworksGrowing Trends of Open Source UI Frameworks
Growing Trends of Open Source UI FrameworksSmartBear
 
Tech talks (Automation on Selenium Web Driver. How to begin & implement)
Tech talks (Automation on Selenium Web Driver. How to begin & implement)Tech talks (Automation on Selenium Web Driver. How to begin & implement)
Tech talks (Automation on Selenium Web Driver. How to begin & implement)Taras Lytvyn
 
Automated testing DrupalCamp in Asheville
Automated testing DrupalCamp in AshevilleAutomated testing DrupalCamp in Asheville
Automated testing DrupalCamp in AshevillePromet Source
 
Colorful world-of-visual-automation-testing-latest
Colorful world-of-visual-automation-testing-latestColorful world-of-visual-automation-testing-latest
Colorful world-of-visual-automation-testing-latestOnur Baskirt
 
Basics of Selenium IDE,Core, Remote Control
Basics of Selenium IDE,Core, Remote ControlBasics of Selenium IDE,Core, Remote Control
Basics of Selenium IDE,Core, Remote Controlusha kannappan
 
Automated Testing using JavaScript
Automated Testing using JavaScriptAutomated Testing using JavaScript
Automated Testing using JavaScriptSimon Guest
 
ICTSS 2010 - Iterative Software Testing Process for Scrum and Waterfall Projects
ICTSS 2010 - Iterative Software Testing Process for Scrum and Waterfall ProjectsICTSS 2010 - Iterative Software Testing Process for Scrum and Waterfall Projects
ICTSS 2010 - Iterative Software Testing Process for Scrum and Waterfall ProjectsEliane Collins
 
Learn Selenium - Online Guide
Learn Selenium - Online GuideLearn Selenium - Online Guide
Learn Selenium - Online Guidebigspire
 
Don't touch that server
Don't touch that serverDon't touch that server
Don't touch that servercrdant
 
Selenium training-course-content-syllabus-credo systemz
Selenium training-course-content-syllabus-credo systemzSelenium training-course-content-syllabus-credo systemz
Selenium training-course-content-syllabus-credo systemzTraining Institute
 
Selenium training12 1
Selenium training12 1Selenium training12 1
Selenium training12 1AmanCSE1
 
Selenium training-course-content
Selenium training-course-contentSelenium training-course-content
Selenium training-course-contentAmanCSE1
 
Selenium training12 1
Selenium training12 1Selenium training12 1
Selenium training12 1AmanCSE1
 
Automated Virtualized Testing (AVT) with Docker, Kubernetes, WireMock and Gat...
Automated Virtualized Testing (AVT) with Docker, Kubernetes, WireMock and Gat...Automated Virtualized Testing (AVT) with Docker, Kubernetes, WireMock and Gat...
Automated Virtualized Testing (AVT) with Docker, Kubernetes, WireMock and Gat...VMware Tanzu
 

Semelhante a SPA 2009 - Acceptance Testing AJAX Web Applications through the GUI (20)

Selenium Basics Tutorial
Selenium Basics TutorialSelenium Basics Tutorial
Selenium Basics Tutorial
 
Cloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
Cloud-powered Continuous Integration and Deployment architectures - Jinesh VariaCloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
Cloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
 
UI Testing Automation - Alex Kalinovsky - CreamTec LLC
UI Testing Automation - Alex Kalinovsky - CreamTec LLCUI Testing Automation - Alex Kalinovsky - CreamTec LLC
UI Testing Automation - Alex Kalinovsky - CreamTec LLC
 
Migrating From HP QTP To TestMaker 6
Migrating From HP QTP To TestMaker 6Migrating From HP QTP To TestMaker 6
Migrating From HP QTP To TestMaker 6
 
Постоянное тестирование интеграции
Постоянное тестирование интеграцииПостоянное тестирование интеграции
Постоянное тестирование интеграции
 
Growing Trends of Open Source UI Frameworks
Growing Trends of Open Source UI FrameworksGrowing Trends of Open Source UI Frameworks
Growing Trends of Open Source UI Frameworks
 
Tech talks (Automation on Selenium Web Driver. How to begin & implement)
Tech talks (Automation on Selenium Web Driver. How to begin & implement)Tech talks (Automation on Selenium Web Driver. How to begin & implement)
Tech talks (Automation on Selenium Web Driver. How to begin & implement)
 
Automated testing DrupalCamp in Asheville
Automated testing DrupalCamp in AshevilleAutomated testing DrupalCamp in Asheville
Automated testing DrupalCamp in Asheville
 
Colorful world-of-visual-automation-testing-latest
Colorful world-of-visual-automation-testing-latestColorful world-of-visual-automation-testing-latest
Colorful world-of-visual-automation-testing-latest
 
Basics of Selenium IDE,Core, Remote Control
Basics of Selenium IDE,Core, Remote ControlBasics of Selenium IDE,Core, Remote Control
Basics of Selenium IDE,Core, Remote Control
 
Automated Testing using JavaScript
Automated Testing using JavaScriptAutomated Testing using JavaScript
Automated Testing using JavaScript
 
Introducing CQ 5.1
Introducing CQ 5.1Introducing CQ 5.1
Introducing CQ 5.1
 
ICTSS 2010 - Iterative Software Testing Process for Scrum and Waterfall Projects
ICTSS 2010 - Iterative Software Testing Process for Scrum and Waterfall ProjectsICTSS 2010 - Iterative Software Testing Process for Scrum and Waterfall Projects
ICTSS 2010 - Iterative Software Testing Process for Scrum and Waterfall Projects
 
Learn Selenium - Online Guide
Learn Selenium - Online GuideLearn Selenium - Online Guide
Learn Selenium - Online Guide
 
Don't touch that server
Don't touch that serverDon't touch that server
Don't touch that server
 
Selenium training-course-content-syllabus-credo systemz
Selenium training-course-content-syllabus-credo systemzSelenium training-course-content-syllabus-credo systemz
Selenium training-course-content-syllabus-credo systemz
 
Selenium training12 1
Selenium training12 1Selenium training12 1
Selenium training12 1
 
Selenium training-course-content
Selenium training-course-contentSelenium training-course-content
Selenium training-course-content
 
Selenium training12 1
Selenium training12 1Selenium training12 1
Selenium training12 1
 
Automated Virtualized Testing (AVT) with Docker, Kubernetes, WireMock and Gat...
Automated Virtualized Testing (AVT) with Docker, Kubernetes, WireMock and Gat...Automated Virtualized Testing (AVT) with Docker, Kubernetes, WireMock and Gat...
Automated Virtualized Testing (AVT) with Docker, Kubernetes, WireMock and Gat...
 

Último

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 

Último (20)

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 

SPA 2009 - Acceptance Testing AJAX Web Applications through the GUI

  • 1. Testing Ajax Applications SPA 2009 © 2009 CAPLIN SYSTEMS
  • 2. Testing AJAX Applications INTRODUCTIONS 2 © 2009 CAPLIN SYSTEMS
  • 3. Who we are  Patrick Myles Head of Engineering, Caplin Systems  Andrew MacLeod JavaScript Architect, Caplin Systems 3 © 2009 CAPLIN SYSTEMS
  • 4. How this talk came about  We have a big Ajax application  We use Agile  We needed a way to test each release This is the overview we wish we’d had 2 years ago 4 © 2009 CAPLIN SYSTEMS
  • 5. This is not a Selenium HOWTO  Just enough Selenium to:  understand the grammar  promote a discussion on frameworks  see how good Selenium is!  Not enough Selenium to:  lose non-programmers (e.g. QA engineers)  get bogged down in Selenium nuts-and-bolts  see how frustrating Selenium is! 5 © 2009 CAPLIN SYSTEMS
  • 6. Frustration Browsers were never designed as platforms for automated tests... ...so browser test tools are a hack! 6 © 2009 CAPLIN SYSTEMS
  • 7. We would like you to leave with...  Confidence  automated testing  hands-on experience  Ideas  designing tests  tool selection  building a framework  planning a test programme 7 © 2009 CAPLIN SYSTEMS
  • 8. Testing AJAX Applications THE PROBLEM 8 © 2009 CAPLIN SYSTEMS
  • 9. The Problem  How can we ensure that each release of our application works everywhere? 9 © 2009 CAPLIN SYSTEMS
  • 10. Manual Testing DOM Test Browser Pack Application Tester (acting as the User)  Repeat for each new feature  Repeat for all supported platforms . 10 © 2009 CAPLIN SYSTEMS
  • 11. Automated Testing DOM Test Browser Script Application Robot (acting as the User)  How intelligent is the robot?  How human readable is the script?  How much effort does the robot consume? . 11 © 2009 CAPLIN SYSTEMS
  • 12. Tools Test Behaviour Driven FIT Fitnesse Framework Development COM Cucumber WebTest browser control Domain Specific rspec Language (DSL) Watir Selenium hamcrest TestNG WebDriver Mercury JSUnit HttpUnit WindowLicker Windmill Auto-Hotkey LoadRunner DOM browser control Screen coordinates 12 © 2009 CAPLIN SYSTEMS
  • 13. Workshop Why are browser applications so difficult to test? 13 © 2009 CAPLIN SYSTEMS
  • 14. Testing AJAX Applications CAPLIN: 5 MINUTE CASE STUDY 14 © 2009 CAPLIN SYSTEMS
  • 15. Caplin Trader  Quick demonstration
  • 16. Caplin’s Timeline 2007 2008 2009 Scope Smoke Test (continuous integration) Functional Tests (nightly) Performance Tests Authors Apps Reference Implementation Bespoke Implementations (up to 3 in parallel) Development QA Framework Selenium Framework v1 Selenium Framework v2 16 © 2009 CAPLIN SYSTEMS
  • 18. ... a more recent test goal: Use product finder portlet do Login (${username}=”user1quot;, ${password}=quot;testerquot;) do CreateNewLayout do Insert (${portlet}=“Product Finder”) do AssertPortletPresent (${portlet}=“Product Finder”) do Logout
  • 19. Testing AJAX Applications EXERCISE 1: SELENIUM IDE: SEND AN EMAIL 19 © 2009 CAPLIN SYSTEMS
  • 20. Objective  To get familiar with the Selenium IDE  To produce a simple test script  To review the script afterwards  Experience some Ajax testing pitfalls
  • 21. Schema interact record playback
  • 22. User Story “As a user, I want to send an e-mail message so that I can stay in touch with my friend” 22 © 2009 CAPLIN SYSTEMS
  • 23. Golden Rule Put yourself in the user’s position  write the test first  watch it fail  fix it 23 © 2009 CAPLIN SYSTEMS
  • 24. Tools: Firefox Add-ons  Firefox Selenium IDE  easy authoring tool  Firebug debugger  reverse engineering tool  XPather  locates UI elements 24 © 2009 CAPLIN SYSTEMS
  • 25. Demo  Open Firefox IDE  Record  Save  Playback 25 © 2009 CAPLIN SYSTEMS
  • 26. Setup…  Disconnect from LAN  Connect to CaplinSpa2009 wireless network  Plug USB key  Open Firefox + Selenium IDE  (set ?:Examplesuser-extensions.js)  Navigate to http://spa2009.com/webmail 26 © 2009 CAPLIN SYSTEMS
  • 27. Your Turn…  Login:  user: spa1  password: caplin2009  Send mail To: patrick@spa2009.com  Insert appropriate actions:  pause  waitForElementPresent  waitForEditable  Save in /Exercise1-Basic/ 27 © 2009 CAPLIN SYSTEMS
  • 28. Selenium IDE Review Pros Cons   easy to set up no explicit verification   easy to write locators are unintelligible   easy to run brittle   little Selenium knowledge unstructured required  desktop orientated  generates code!  feature must exist 28 © 2009 CAPLIN SYSTEMS
  • 29. Testing AJAX Applications SELENIUM: 5 MINUTE TUTORIAL 29 © 2009 CAPLIN SYSTEMS
  • 30. Selenium Test Script One step per line... action thing to optional act on argument 30 © 2009 CAPLIN SYSTEMS
  • 31. Actions  Selenium Selenium.prototype.doType(sInputLocator, sInputText) Selenium.prototype.doClick(sLocator)  Custom Framework Selenium.prototype.doClickControl(sLocator) 31 © 2009 CAPLIN SYSTEMS
  • 32. Locators  Selenium xpath id link ...  Custom Framework PageBot.prototype.locateElementByMenuBarItem(sLocatorText, oDocument) 32 © 2009 CAPLIN SYSTEMS
  • 33. Accessors  Selenium waitFor store ElementPresent assert verify Selenium.prototype.isElementPresent(sLocator)  Custom waitFor store MessageCount assert verify Selenium.prototype.getMessageCount(sLocator) 33 © 2009 CAPLIN SYSTEMS
  • 34. Testing AJAX Applications SCRIPTS: INTERPRETERS AND RUNNERS 34 © 2009 CAPLIN SYSTEMS
  • 35. Script: Machine vs. Human readable Pianola (acting as pianist) Piano Roll 35 © 2009 CAPLIN SYSTEMS
  • 36. After the break... Linguistic Application Constructs Abstractions • locator strategies • structure • application • functions operations • control flow • state transitions DOM Source Browser compiler Interpreter Runner Code COM Application 36 © 2009 CAPLIN SYSTEMS
  • 37. Testing AJAX Applications COFFEE BREAK (10 MINUTES) 37 © 2009 CAPLIN SYSTEMS
  • 38. Design Principles Testing Ajax applications 38 © 2009 CAPLIN SYSTEMS
  • 39. Design Principles  Domain Hierarchies  how to make my tests more readable?  modeling vs. maintainability?  how can I isolate application changes?  Test structure and composition  how do I avoid duplication?  how do my tests map to my requirements?  how can I make my framework scalable? 39 © 2009 CAPLIN SYSTEMS
  • 40. Testing AJAX Applications DOMAIN HIERARCHIES 40 © 2009 CAPLIN SYSTEMS
  • 41. ? Test framework Verification Domain (Locate, input, verify, etc.) Test tool Browser Domain (DOM, text nodes, clicks, etc.) Application System Domain (OO language, may model business domain) 41 © 2009 CAPLIN SYSTEMS
  • 42. What to use for framework domain? 1. Don’t bother! ... 42 © 2009 CAPLIN SYSTEMS
  • 43. ? Test framework Verification Domain Test framework (Locate, input, verify, etc.) Test tool Browser Domain (DOM, text nodes, clicks, etc.) Application System Domain (OO language, may model business domain) 43 © 2009 CAPLIN SYSTEMS
  • 44. What to use for framework domain? 1. Don’t bother... Quick to get going Can use off-the-shelf tools (e.g. Selenium IDE) Lots of duplication in tests Maintenance nightmare Brittle tests Rapidly become hard to read and author 44 © 2009 CAPLIN SYSTEMS
  • 45. What to use for framework domain? 2. Mirror of system domain... 45 © 2009 CAPLIN SYSTEMS
  • 46. ?? System Domain (again) Test framework Verification Domain (Locate, input, verify, etc.) Test tool Browser Domain (DOM, text nodes, clicks, etc.) Application System Domain (OO language, may model business domain) 46 © 2009 CAPLIN SYSTEMS
  • 47. What to use for framework domain? 2. Mirror of system domain... Usually in same language as System Seems attractive – particularly if System is well modelled on problem domain Can “share” domain objects Often ends up with either tight coupling... ...or duplicated code / abstractions on both sides of the Browser/Verification divide Using same language as System doesn’t reinforce the domain separation 47 © 2009 CAPLIN SYSTEMS
  • 48. What to use for framework domain? 3. Model or DSL that reinforces user’s interactions and use-cases... 48 © 2009 CAPLIN SYSTEMS
  • 49. ? Business (User) Domain / DSL (Inbox, compose, check mail, logout, etc.) Test framework Verification Domain (Locate, input, verify, etc.) Test tool Browser Domain (DOM, text nodes, clicks, etc.) Application System Domain (OO language, may model business domain) 49 © 2009 CAPLIN SYSTEMS
  • 50. What to use for framework domain? 3. Model or DSL that reinforces user’s interactions and use-cases... Easier to understand for non-programmers Less brittle when underlying domains change More natural abstractions Requires more maintenance of different abstractions Can make it hard to implement complex interactions 50 © 2009 CAPLIN SYSTEMS
  • 51. Testing AJAX Applications EXERCISE 2: USING A FRAMEWORK 51 © 2009 CAPLIN SYSTEMS
  • 52. Objectives  Move test script closer to application domain  Introduce logical names for screen controls  Remove physical references to screen controls  Show Selenium extensions  Make tests more readable 52 © 2009 CAPLIN SYSTEMS
  • 53. Selenium Framework Application Abstractions • actions • locators DOM Source Browser Interpreter Runner Code Application COM 53 © 2009 CAPLIN SYSTEMS
  • 54. Exercise 2 - Framework  Demo 54 © 2009 CAPLIN SYSTEMS
  • 55. Testing AJAX Applications UCD TEST STRUCTURE 55 © 2009 CAPLIN SYSTEMS
  • 56. User Centered Design (UCD)  A powerful way to model and design a system  Like Agile, focuses on Users – their needs and goals  Typically used for UI/UX design, but provides great models for test frameworks  We use with a simple text DSL 56 © 2009 CAPLIN SYSTEMS
  • 57. User Centered Design (UCD)  Brings focus back to users and their  Goals  Tasks • Actions  Fits well with user story structure: As a [type of user] I want to [a task or sequence of tasks] so that I can [achieve some goal] 57 © 2009 CAPLIN SYSTEMS
  • 58. Use-Cases and UCD UCD concepts map well to use-case levels Goal Task Action 58 © 2009 CAPLIN SYSTEMS
  • 59. Story Structure Tasks Goal Actions Send Email Login Action Action Send Message Action Action Action Logout Action Action 59 © 2009 CAPLIN SYSTEMS
  • 60. Testing AJAX Applications EXERCISE 3: RUNNING A UCD TEST 60 © 2009 CAPLIN SYSTEMS
  • 61. Objectives  Demonstrate UCD structure  Show task re-use  Implement a new task 61 © 2009 CAPLIN SYSTEMS
  • 62. Old Structure Test Action Action Action Action Action Action Action Action 62 © 2009 CAPLIN SYSTEMS
  • 63. UCD Structure Goal Task Action Action Task Action Action Action Task Action Action 63 © 2009 CAPLIN SYSTEMS
  • 64. Demonstration  Goal/Task/Action hierarchy  Task level convenient for  Reuse  Maintenance  Communication  Action level too small to be reusable 64 © 2009 CAPLIN SYSTEMS
  • 65. UCD Structure Send Email Login Action Action Send Message Action Action Action Verify Sent Action Action Logout Action Action 65 © 2009 CAPLIN SYSTEMS
  • 66. A new story… “As a user, I want to receive an email so that I can prove I have a friend!” 66 © 2009 CAPLIN SYSTEMS
  • 67. Your Turn... Receive Email Login Action Action Action Verify Inbox non-empty Action Logout Action Action 67 © 2009 CAPLIN SYSTEMS
  • 68. Testing AJAX Applications SUMMARY 68 © 2009 CAPLIN SYSTEMS
  • 69. Summary  Selenium is not a perfect testing tool, but…  Selenium extensions are effective  actions  locators  accessors  UCD is a good way to structure test cases  goals  tasks  actions
  • 70. Taking things forward…  Develop a simple DSL for testers to use  invoke tasks with parameters  get rid of ugly HTML “Selenese”  use a PATH mechanism to locate tasks -- goal: use product finder portlet do Login (${username}=”user1quot;, ${password}=quot;testerquot;) do CreateNewLayout do Insert (${portlet}=“Product Finder”) do AssertPortletPresent (${portlet}=“Product Finder”) do Logout