SlideShare a Scribd company logo
1 of 57
Download to read offline
<Insert Picture Here>




Automating JFC UI application testing with Jemmy.

Alexandre (Shura) Iline
Java SE and JavaFX Quality architect.
The following is intended to outline our general product
direction. It is intended for information purposes, and
may not be incorporated into any contract. It is not a
commitment to deliver any material, code, or
functionality, and should not be relied upon in making
purchasing decisions.
The development, release, and timing of any features
or functionality described for Oracle's products remains
at the sole discretion of Oracle.
This presentation shares experience gotten
 from testing such products as




                   JRockit       JavaFX AT
What's in scope

• All sorts of definitions
“Testing”, “UI testing”, “Test automation”
• Jemmy library
• Automation approaches effectiveness and cost.
• Bunch of source code
  • Basic Jemmy operations
  • Less basic operations
  • Switches and settings
• Tricks and tips
• Misconceptions
What's not in scope

• The economical effects
   • A.k.a. what's “quality”
   • Why to automate
      • Automation cost vs. manual testing cost
   • When to automate
   • What to automate
• Non-economical benefits of automation




A.k.a. let's leave it for later. :)
UI testing … by Wikipedia


«GUI software testing is the
process of testing a product
that uses a graphical user
interface, to ensure it meets its
written specifications.»
UI testing … most often ...




«Checking whether usage of a
product UI leads to results
expected by the the person
who performs testing»
Sample test scenario


●Start text editor
●Push «File/Open»

●Verify file chooser directory

●Select some file

●Verify editor area content

●Verify application title

●Verify buttons availabilities


●
    ....
UI test workflow


                                                            Pass
                         Perform necessary
                               actions


Find          Pass            Do             Pass           Verify


         Find next control           Verify that expected
       To perform operation             State reached
Fail                          Fail                           Fail


                        Failure analysis
Test automation ... for me



«Building a process which
exercises and reports certain
product characteristics while
run unattended.»
Test automation is like development

• Putting logic in a code
• Same lifecycle:
   • Requirements
   • Design
   • Implementation
• Same set of problems
   • Bugs
   • Instabilities
• Scope
   • defined through test specification/plan
Test automation is not like
  development
• Big fat dependency – the tested product
   • vs many libraries and platform
• Many small programs
   • vs one big program
• Does one thing good – reports status
   • vs does many thing ... good
• Perfectness is not the goal
   • other than maintenance cost, ease of use
Jemmy
Jemmy history
• Started as a tool to tests TeamWare UI (1999)
• Used for NetBeans extensions (2000)
• Official test tool for NetBeans (2001)
• Open-source (2001)
• Is used for NetBeans and extensions since then
• Adopted as a test tool for Swing (~2003)
• Used outside SUN Microsystems (next slide)
• Jemmy v3 created (2008)
• The test tool for JavaFX SDK (2008 – now)
• Extended to support SWT
• Test tool for JRMC
Jemmy and extensions

Jemmy v2                                        LCDUI
                NetBeans           JemmySG
AWT & Swing




JDK              JemmyAWT       JemmyCore        JemmyRemote




                JemmySWT
  Jemmy v3                         JemmyFX      JemmyFXRemote



               JRMC
                             JavaFX Authoring
                                                JavaFX
                             Tool
Jemmy v2
   JFC
Same VM.

Test code runs in the same VM as the application code
• Benefits
  • Full access to the application UI objects
  • As well as the application domain object (sometimes).
  • Control over event queue
• Drawbacks
   • Impacts the tested UI
• Options
  • Run application from test
  • Run test from application
  • Use accessibility hook
Demo




       Using Jemmy
Operators

                                                       JFrameOperator
                                                        JFrameOperator
JTextFieldOperator
 JTextFieldOperator                                       getTitle(),
     getText(),                                            getTitle(),
      getText(),                                              ...
                                                                ...
  typeText(...), ...
   typeText(...), ...



           JButtonOperator                 JComboBoxOperator
                                            JComboBoxOperator
            JButtonOperator
              getText(),                     getSelectedItem(),
                                              getSelectedItem(),
               getText(),
                push()                         selectItem(...)
                                                selectItem(...)
                 push()


                              Test code
                               Test code
Demo




       Operators
Threading

                               “noblocking”
                               operation
         periodical
         checks



action   waiting      action    waiting       action




              action
Demo




        Waiting
       Timeouts
Event queue




User
                 UI
       Other
       threads
Event queue
                               with test


  Lookup

  Actions

Verifications
Test
                          UI
                Other
                threads
Demo




       Event queue tools
Drivers
    TextDriver
    typeText()                                         WindowDriver
        ...

                                                     JFrameOperator
JTextFieldOperator

             ButtonDriver                   ListDriver
               push(...)                   slectItem(...)
                  ...                            ...

          JButtonOperator               JComboBoxOperator


                            Test code
Demo




       Drivers
Dispatching modes

• Events
   • Proper events in a proper order are dispatched to a
     component making it thinking some user actions are
     performed.
• Shortcut
   • Same as events except the events are posted into the event
     queue at once.
• Robot
   • java.awt.Robot is used



Implemented with driver sets
Demo




       Dispatching models
Image

• Fragile
• Needed for custom controls


• Comparison
   • Pixel-to-pixel
   • %s of pixels
   • Color distance
      • Average
      • Maximum
Demo




       Verifying images
Automation
             approaches
Application UI


Product UI
 Product UI




                         33
                    33
Coordinates

•   click(134,32) //selects some record
•   click(215,122) //hits “Properties”
•   sleep(5) //sleeps to let dialog be painted
•   click(64,182) //expands color combo
•   click(235,182) //selects Gray
•   click(235,212) //hit OK




                                                      34
                                                 34
Widgets

•   Find “Car records” frame
•   Find table
•   Select “1abc234” cell
•   Push “Properties” button
•   Wait for “1abc234” dialog
•   Select “Gray” color in combo box
•   Push “OK”




                                            35
                                       35
Widgets or coordinates

                 Car record
Domain
Domain
model
model



                    Model
                     Model    Make    VIN
                                       VIN    Color    Year    License plate
                               Make            Color    Year    License plate
 Product UI
Product UI




                                             Test

                                                                                 36
                                                                            36
Demo




       Cars test
       Widgets
UI Primitives

• Find car list frame
CarListFrame list = new CarListFrame()
• Open properties dialog for car “1abc234”
CarDialog propDialog =
 list.carProperties(“1abc234”);
• Set color to gray
propDialog.setColor(Color.GRAY);
• Apply changes
propDialog.ok();

                                                  38
                                             38
Library
Domain


                 Car record
Domain


                              Model Make VIN Color Year    License plate
model

                               Model Make VIN Color Year    License plate
model
 Product UI
Product UI




                     CarListFrame   Test library
                                     Test library      CarDialog



                                        Test
                                                                                 39
                                                                            39
Demo




       Cars test
       UI Library
Domain model

• Set color to gray for a car “1abc234”


new CarRecord(“1abc234”).
    setColor(Color.GRAY);



   Underneath the cover, CarRecord class does
    all described earlier


                                                41
                                          41
Domain library
 Domain




           Car record
Domain
 model




                           Model Make VIN Color Year    License plate
model




                            Model Make VIN Color Year    License plate
 Product
Product
 UI
UI




                        CarList      UI test library
                                      UI test library      CarDialog

                                        CarRecord                 Domain test library
                                                                   Domain test library

                                          Test

                                                                                 42
                                                                         42
Demo




         Cars test
       Domain Library
Automation
             effectiveness
The formula?
                   TM      * NR           *     NC
EA     =
                TD    +      TS     *         NR *    NC

EA – automation effectiveness
           To be used for every particular product.


NR and NC are unique for a product.
TM is a characteristic of a test suite.
Smaller TD and TS - higher the EA.

                     Coefficient depend on the way you write your tests
Td and Ts together
8
                                              7.5

7           Td/Tm
6
            Ts/Tm
                                5
5

4
                    3
3

2
      1.1       1
1
                         0.5
                                      0.1            0.05
0
     Coordinates    Widgets    UI Library   Domain library
TD and TS for NC=3, NR=8, TM=1
30

                25.1                                         Td
25         24
                                                             Ts
                                                             Td+(Ts*Nc*Nr)
20

                                     15
15
                             12

10                                                                           8.7
                                                       7.4       7.5

                                          5
 5
                       3                         2.4
     1.1                                                               1.2
 0
      Coordinates          Widgets            UI Library         Domain library
EA for NC=3, NR=8
 3.5
                          3.24
   3
                                           2.76
 2.5

   2
                1.6
 1.5

   0.96
   1

 0.5

   0
Coordinates   Widgets   UI Library   Domain library
                                      Ea
Misconceptions

• Automated testing replaces manual testing
   • it will find all the bugs
   • it will find more bugs
   • it does the same amount of work
• Create once use forever
• This is easy
• This is too hard
• No need to create test plan
• “Will just buy the XXX tool and it will solve all out
 problems”
Resources

            jemmy.dev.java.net
<Insert Picture Here>




Automating JFC UI application testing.
With Jemmy.
The technical aspects.
Alexandre (Shura) Iline
Java SE and JavaFX Quality architect.
Backup slides
Coverage

• Implementation coverage
   • Line, block, condition, sequence, ...
• Specification coverage
   • How well the tests covering the functional specification
• Public API coverage
   • Whether the public API is tested fully
• UI coverage
   • Whether the tests cover UI fully
• Combine with bug density
   • First cover the areas with more bugs
• Combine with code complexity
   • First cover the more complicated code.
Continuous build

                                          Build
                                         Executed
 Code                                  automatically             Success
            Commit
changes                                after commit

                                                                            Yes.
                                                                   No
            Analysis.
                                             Rollback!!!
     Development

                                                           Promote
                        Test further                   Code is compilable
Continuous build with testing

 Code                                     Build            Success
changes                 Commit
                                                     No
                                       Rollback!!!                    Yes.
                                                           = Compilation
  Test             Analysis.                                   successful
changes                                     No


                                                          Testing
    Test further                         Passed
   Build is good                 Yes                 Is it working?
 Code line is healthy
      Go on ...
Pre-integration


  Code
 changes
                               Yes
            Testing   Passed         Commit

   Test
 changes              No
How to benefit from UI automation?
  Use it!
• Sanity
• Pre-integration
• Attach to bug reports
• Make is a quality criteria
• Run it for every build
• Show it to the boss :)
• Don't forget to show it to the dev. team

More Related Content

What's hot

Complete java swing
Complete java swingComplete java swing
Complete java swingjehan1987
 
Java Swing
Java SwingJava Swing
Java SwingShraddha
 
Mastering your Eclipse IDE - Java tooling, Tips & Tricks!
Mastering your Eclipse IDE - Java tooling, Tips & Tricks!Mastering your Eclipse IDE - Java tooling, Tips & Tricks!
Mastering your Eclipse IDE - Java tooling, Tips & Tricks!Noopur Gupta
 

What's hot (6)

Java swing
Java swingJava swing
Java swing
 
Complete java swing
Complete java swingComplete java swing
Complete java swing
 
Chapter 1 swings
Chapter 1 swingsChapter 1 swings
Chapter 1 swings
 
Java Swing
Java SwingJava Swing
Java Swing
 
Junit tutorial
Junit tutorialJunit tutorial
Junit tutorial
 
Mastering your Eclipse IDE - Java tooling, Tips & Tricks!
Mastering your Eclipse IDE - Java tooling, Tips & Tricks!Mastering your Eclipse IDE - Java tooling, Tips & Tricks!
Mastering your Eclipse IDE - Java tooling, Tips & Tricks!
 

Viewers also liked

Savez-vous ce qui se cache derrière votre assiette?
Savez-vous ce qui se cache derrière votre assiette? Savez-vous ce qui se cache derrière votre assiette?
Savez-vous ce qui se cache derrière votre assiette? Bertaux Mylene
 
Voces Del Microclima
Voces Del MicroclimaVoces Del Microclima
Voces Del Microclimasabalero666
 
Atelier08 - Feb March 2003 Nowack House
Atelier08 - Feb March 2003 Nowack HouseAtelier08 - Feb March 2003 Nowack House
Atelier08 - Feb March 2003 Nowack HouseArmin Widmann
 
Altc 2010 paper_0188_cb_dh
Altc 2010 paper_0188_cb_dhAltc 2010 paper_0188_cb_dh
Altc 2010 paper_0188_cb_dhClaire B
 
Energy Interactive
Energy InteractiveEnergy Interactive
Energy Interactivedmaramba
 
The holy land 2015
The holy land 2015The holy land 2015
The holy land 2015tomdinapoli
 
Building A Successful Campaign with Google Adwords
Building A Successful Campaign with Google AdwordsBuilding A Successful Campaign with Google Adwords
Building A Successful Campaign with Google AdwordsclickTRUE
 
Keiwa hopeお菓子つくり係募集についてのプレゼン
Keiwa hopeお菓子つくり係募集についてのプレゼンKeiwa hopeお菓子つくり係募集についてのプレゼン
Keiwa hopeお菓子つくり係募集についてのプレゼンmaruri0423
 
Graduate Students Workshop
Graduate Students Workshop Graduate Students Workshop
Graduate Students Workshop Naz Torabi
 
Set your objectives
Set your objectivesSet your objectives
Set your objectivesArif Mahmood
 
E Brochure Of Northeast Construction
E Brochure Of Northeast ConstructionE Brochure Of Northeast Construction
E Brochure Of Northeast Constructiondcheon1
 
Knowing your purpose in life lesson #3
Knowing your purpose in life lesson #3Knowing your purpose in life lesson #3
Knowing your purpose in life lesson #3Vision of Hope
 
Viral business v2
Viral business v2Viral business v2
Viral business v2jonfisheruk
 
Presentación inversionistas jeunesse
Presentación inversionistas jeunessePresentación inversionistas jeunesse
Presentación inversionistas jeunesseJulio Ignacio García
 
Indonesia friendly memory championship i mengasah daya ingat lewat kompetisi
Indonesia friendly memory championship i  mengasah daya ingat lewat kompetisiIndonesia friendly memory championship i  mengasah daya ingat lewat kompetisi
Indonesia friendly memory championship i mengasah daya ingat lewat kompetisiYudi Lesmana
 
O desafio das pequenas empresas para anunciar no google
O desafio das pequenas empresas para anunciar no googleO desafio das pequenas empresas para anunciar no google
O desafio das pequenas empresas para anunciar no googleEduardo Valente
 

Viewers also liked (20)

Savez-vous ce qui se cache derrière votre assiette?
Savez-vous ce qui se cache derrière votre assiette? Savez-vous ce qui se cache derrière votre assiette?
Savez-vous ce qui se cache derrière votre assiette?
 
Voces Del Microclima
Voces Del MicroclimaVoces Del Microclima
Voces Del Microclima
 
Emodile
EmodileEmodile
Emodile
 
Oaworkshop
OaworkshopOaworkshop
Oaworkshop
 
Atelier08 - Feb March 2003 Nowack House
Atelier08 - Feb March 2003 Nowack HouseAtelier08 - Feb March 2003 Nowack House
Atelier08 - Feb March 2003 Nowack House
 
Altc 2010 paper_0188_cb_dh
Altc 2010 paper_0188_cb_dhAltc 2010 paper_0188_cb_dh
Altc 2010 paper_0188_cb_dh
 
Energy Interactive
Energy InteractiveEnergy Interactive
Energy Interactive
 
The holy land 2015
The holy land 2015The holy land 2015
The holy land 2015
 
Building A Successful Campaign with Google Adwords
Building A Successful Campaign with Google AdwordsBuilding A Successful Campaign with Google Adwords
Building A Successful Campaign with Google Adwords
 
Keiwa hopeお菓子つくり係募集についてのプレゼン
Keiwa hopeお菓子つくり係募集についてのプレゼンKeiwa hopeお菓子つくり係募集についてのプレゼン
Keiwa hopeお菓子つくり係募集についてのプレゼン
 
Graduate Students Workshop
Graduate Students Workshop Graduate Students Workshop
Graduate Students Workshop
 
Set your objectives
Set your objectivesSet your objectives
Set your objectives
 
Testing 1
Testing 1Testing 1
Testing 1
 
E Brochure Of Northeast Construction
E Brochure Of Northeast ConstructionE Brochure Of Northeast Construction
E Brochure Of Northeast Construction
 
Knowing your purpose in life lesson #3
Knowing your purpose in life lesson #3Knowing your purpose in life lesson #3
Knowing your purpose in life lesson #3
 
Viral business v2
Viral business v2Viral business v2
Viral business v2
 
Presentación inversionistas jeunesse
Presentación inversionistas jeunessePresentación inversionistas jeunesse
Presentación inversionistas jeunesse
 
Smart Participation for Social Learning
Smart Participation for Social LearningSmart Participation for Social Learning
Smart Participation for Social Learning
 
Indonesia friendly memory championship i mengasah daya ingat lewat kompetisi
Indonesia friendly memory championship i  mengasah daya ingat lewat kompetisiIndonesia friendly memory championship i  mengasah daya ingat lewat kompetisi
Indonesia friendly memory championship i mengasah daya ingat lewat kompetisi
 
O desafio das pequenas empresas para anunciar no google
O desafio das pequenas empresas para anunciar no googleO desafio das pequenas empresas para anunciar no google
O desafio das pequenas empresas para anunciar no google
 

Similar to Automating JFC UI application testing with Jemmy

Alexandre Iline Rit 2010 Java Fxui
Alexandre Iline Rit 2010 Java FxuiAlexandre Iline Rit 2010 Java Fxui
Alexandre Iline Rit 2010 Java Fxuiguest092df8
 
Александр Ильин, Oracle, - Технология автоматизации тестирования пользователь...
Александр Ильин, Oracle, - Технология автоматизации тестирования пользователь...Александр Ильин, Oracle, - Технология автоматизации тестирования пользователь...
Александр Ильин, Oracle, - Технология автоматизации тестирования пользователь...Media Gorod
 
Alexandre.iline rit 2010 java_fxui_extra
Alexandre.iline rit 2010 java_fxui_extraAlexandre.iline rit 2010 java_fxui_extra
Alexandre.iline rit 2010 java_fxui_extrarit2010
 
Advanced Coded UI Testing
Advanced Coded UI TestingAdvanced Coded UI Testing
Advanced Coded UI TestingShai Raiten
 
Getting Started with XCTest and XCUITest for iOS App Testing
Getting Started with XCTest and XCUITest for iOS App TestingGetting Started with XCTest and XCUITest for iOS App Testing
Getting Started with XCTest and XCUITest for iOS App TestingBitbar
 
automation framework
automation frameworkautomation framework
automation frameworkANSHU GOYAL
 
Guide to the jungle of testing frameworks
Guide to the jungle of testing frameworksGuide to the jungle of testing frameworks
Guide to the jungle of testing frameworksTomáš Kypta
 
Test Driven Development with JavaFX
Test Driven Development with JavaFXTest Driven Development with JavaFX
Test Driven Development with JavaFXHendrik Ebbers
 
Toronto User groups workshop - 2013-03-10 - HTML5 & Windows 8, friends with b...
Toronto User groups workshop - 2013-03-10 - HTML5 & Windows 8, friends with b...Toronto User groups workshop - 2013-03-10 - HTML5 & Windows 8, friends with b...
Toronto User groups workshop - 2013-03-10 - HTML5 & Windows 8, friends with b...Frédéric Harper
 
Pekka_Aho_Complementing GUI Testing Scripts - Testing Assembly 2022.pdf
Pekka_Aho_Complementing GUI Testing Scripts -  Testing Assembly 2022.pdfPekka_Aho_Complementing GUI Testing Scripts -  Testing Assembly 2022.pdf
Pekka_Aho_Complementing GUI Testing Scripts - Testing Assembly 2022.pdfFiSTB
 
Devday2016 real unittestingwithmockframework-phatvu
Devday2016 real unittestingwithmockframework-phatvuDevday2016 real unittestingwithmockframework-phatvu
Devday2016 real unittestingwithmockframework-phatvuPhat VU
 
Cross Platform Appium Tests: How To
Cross Platform Appium Tests: How ToCross Platform Appium Tests: How To
Cross Platform Appium Tests: How ToGlobalLogic Ukraine
 
[DevDay 2016] Real Unit Testing with mocking framework - Speaker: Phat Vu – S...
[DevDay 2016] Real Unit Testing with mocking framework - Speaker: Phat Vu – S...[DevDay 2016] Real Unit Testing with mocking framework - Speaker: Phat Vu – S...
[DevDay 2016] Real Unit Testing with mocking framework - Speaker: Phat Vu – S...DevDay.org
 
Testing Ext JS and Sencha Touch
Testing Ext JS and Sencha TouchTesting Ext JS and Sencha Touch
Testing Ext JS and Sencha TouchMats Bryntse
 
UI Automation_White_CodedUI common problems and tricks
UI Automation_White_CodedUI common problems and tricksUI Automation_White_CodedUI common problems and tricks
UI Automation_White_CodedUI common problems and tricksTsimafei Avilin
 

Similar to Automating JFC UI application testing with Jemmy (20)

Alexandre Iline Rit 2010 Java Fxui
Alexandre Iline Rit 2010 Java FxuiAlexandre Iline Rit 2010 Java Fxui
Alexandre Iline Rit 2010 Java Fxui
 
Александр Ильин, Oracle, - Технология автоматизации тестирования пользователь...
Александр Ильин, Oracle, - Технология автоматизации тестирования пользователь...Александр Ильин, Oracle, - Технология автоматизации тестирования пользователь...
Александр Ильин, Oracle, - Технология автоматизации тестирования пользователь...
 
Alexandre.iline rit 2010 java_fxui_extra
Alexandre.iline rit 2010 java_fxui_extraAlexandre.iline rit 2010 java_fxui_extra
Alexandre.iline rit 2010 java_fxui_extra
 
Advanced Coded UI Testing
Advanced Coded UI TestingAdvanced Coded UI Testing
Advanced Coded UI Testing
 
Qtp - Introduction to synchronization
Qtp -  Introduction to synchronizationQtp -  Introduction to synchronization
Qtp - Introduction to synchronization
 
Robotium - sampath
Robotium - sampathRobotium - sampath
Robotium - sampath
 
Getting Started with XCTest and XCUITest for iOS App Testing
Getting Started with XCTest and XCUITest for iOS App TestingGetting Started with XCTest and XCUITest for iOS App Testing
Getting Started with XCTest and XCUITest for iOS App Testing
 
TestCafe Meetup Malmberg
TestCafe Meetup MalmbergTestCafe Meetup Malmberg
TestCafe Meetup Malmberg
 
automation framework
automation frameworkautomation framework
automation framework
 
Coding Naked
Coding NakedCoding Naked
Coding Naked
 
Guide to the jungle of testing frameworks
Guide to the jungle of testing frameworksGuide to the jungle of testing frameworks
Guide to the jungle of testing frameworks
 
Test Driven Development with JavaFX
Test Driven Development with JavaFXTest Driven Development with JavaFX
Test Driven Development with JavaFX
 
Toronto User groups workshop - 2013-03-10 - HTML5 & Windows 8, friends with b...
Toronto User groups workshop - 2013-03-10 - HTML5 & Windows 8, friends with b...Toronto User groups workshop - 2013-03-10 - HTML5 & Windows 8, friends with b...
Toronto User groups workshop - 2013-03-10 - HTML5 & Windows 8, friends with b...
 
Pekka_Aho_Complementing GUI Testing Scripts - Testing Assembly 2022.pdf
Pekka_Aho_Complementing GUI Testing Scripts -  Testing Assembly 2022.pdfPekka_Aho_Complementing GUI Testing Scripts -  Testing Assembly 2022.pdf
Pekka_Aho_Complementing GUI Testing Scripts - Testing Assembly 2022.pdf
 
Devday2016 real unittestingwithmockframework-phatvu
Devday2016 real unittestingwithmockframework-phatvuDevday2016 real unittestingwithmockframework-phatvu
Devday2016 real unittestingwithmockframework-phatvu
 
Cross Platform Appium Tests: How To
Cross Platform Appium Tests: How ToCross Platform Appium Tests: How To
Cross Platform Appium Tests: How To
 
Deep Dive Modern Apps Lifecycle with Visual Studio 2012: How to create cross ...
Deep Dive Modern Apps Lifecycle with Visual Studio 2012: How to create cross ...Deep Dive Modern Apps Lifecycle with Visual Studio 2012: How to create cross ...
Deep Dive Modern Apps Lifecycle with Visual Studio 2012: How to create cross ...
 
[DevDay 2016] Real Unit Testing with mocking framework - Speaker: Phat Vu – S...
[DevDay 2016] Real Unit Testing with mocking framework - Speaker: Phat Vu – S...[DevDay 2016] Real Unit Testing with mocking framework - Speaker: Phat Vu – S...
[DevDay 2016] Real Unit Testing with mocking framework - Speaker: Phat Vu – S...
 
Testing Ext JS and Sencha Touch
Testing Ext JS and Sencha TouchTesting Ext JS and Sencha Touch
Testing Ext JS and Sencha Touch
 
UI Automation_White_CodedUI common problems and tricks
UI Automation_White_CodedUI common problems and tricksUI Automation_White_CodedUI common problems and tricks
UI Automation_White_CodedUI common problems and tricks
 

More from SPB SQA Group

Обсуждаем главы из “97 Things Every Programmer Should Know”
Обсуждаем главы из “97 Things Every Programmer Should Know”Обсуждаем главы из “97 Things Every Programmer Should Know”
Обсуждаем главы из “97 Things Every Programmer Should Know”SPB SQA Group
 
ITGM8. Всеволод Брекелов (Grid Dinamics) Component tests. let's do that!
ITGM8. Всеволод Брекелов (Grid Dinamics) Component tests. let's do that!ITGM8. Всеволод Брекелов (Grid Dinamics) Component tests. let's do that!
ITGM8. Всеволод Брекелов (Grid Dinamics) Component tests. let's do that!SPB SQA Group
 
ITGM8. Илья Коробицын (Grid Dinamics) Автоматизатор, копай глубже, копай шире!
ITGM8. Илья Коробицын (Grid Dinamics) Автоматизатор, копай глубже, копай шире!ITGM8. Илья Коробицын (Grid Dinamics) Автоматизатор, копай глубже, копай шире!
ITGM8. Илья Коробицын (Grid Dinamics) Автоматизатор, копай глубже, копай шире!SPB SQA Group
 
ITGM8. Алексей Лянгузов (Grid Dinamics) Как я ходил в стартап и чем это все з...
ITGM8. Алексей Лянгузов (Grid Dinamics) Как я ходил в стартап и чем это все з...ITGM8. Алексей Лянгузов (Grid Dinamics) Как я ходил в стартап и чем это все з...
ITGM8. Алексей Лянгузов (Grid Dinamics) Как я ходил в стартап и чем это все з...SPB SQA Group
 
ITGM8. Юлия Атлыгина (ALM Works) Инструменты, облегчающее тестирование
ITGM8. Юлия Атлыгина (ALM Works) Инструменты, облегчающее тестированиеITGM8. Юлия Атлыгина (ALM Works) Инструменты, облегчающее тестирование
ITGM8. Юлия Атлыгина (ALM Works) Инструменты, облегчающее тестированиеSPB SQA Group
 
ITGM8. Сергей Атрощенков (Еpam) Buzzword driven development и место тестировщ...
ITGM8. Сергей Атрощенков (Еpam) Buzzword driven development и место тестировщ...ITGM8. Сергей Атрощенков (Еpam) Buzzword driven development и место тестировщ...
ITGM8. Сергей Атрощенков (Еpam) Buzzword driven development и место тестировщ...SPB SQA Group
 
Какая польза от метрик?
Какая польза от метрик?Какая польза от метрик?
Какая польза от метрик?SPB SQA Group
 
Автоматизируем тестирование интерфейса мобильных приложений
Автоматизируем тестирование интерфейса мобильных приложенийАвтоматизируем тестирование интерфейса мобильных приложений
Автоматизируем тестирование интерфейса мобильных приложенийSPB SQA Group
 
"Опыт создания системы управления сборкой и тестированием" (слайдкаст)
"Опыт создания системы управления сборкой и тестированием" (слайдкаст)"Опыт создания системы управления сборкой и тестированием" (слайдкаст)
"Опыт создания системы управления сборкой и тестированием" (слайдкаст)SPB SQA Group
 
"Опыт создания системы управления сборкой и тестированием" (полная)
"Опыт создания системы управления сборкой и тестированием" (полная)"Опыт создания системы управления сборкой и тестированием" (полная)
"Опыт создания системы управления сборкой и тестированием" (полная)SPB SQA Group
 
Нагрузочное тестирование
Нагрузочное тестированиеНагрузочное тестирование
Нагрузочное тестированиеSPB SQA Group
 
Долой отмазки в тестировании!
Долой отмазки в тестировании!Долой отмазки в тестировании!
Долой отмазки в тестировании!SPB SQA Group
 
Вместе весело шагать, или как собрать тестировщиков в своем городе
Вместе весело шагать, или как собрать тестировщиков в своем городеВместе весело шагать, или как собрать тестировщиков в своем городе
Вместе весело шагать, или как собрать тестировщиков в своем городеSPB SQA Group
 
Domain-тестирование
Domain-тестированиеDomain-тестирование
Domain-тестированиеSPB SQA Group
 
Оптимизация интерактивного тестирования с использованием метрики Покрытие кода
Оптимизация интерактивного тестирования с использованием метрики Покрытие кодаОптимизация интерактивного тестирования с использованием метрики Покрытие кода
Оптимизация интерактивного тестирования с использованием метрики Покрытие кодаSPB SQA Group
 

More from SPB SQA Group (16)

Обсуждаем главы из “97 Things Every Programmer Should Know”
Обсуждаем главы из “97 Things Every Programmer Should Know”Обсуждаем главы из “97 Things Every Programmer Should Know”
Обсуждаем главы из “97 Things Every Programmer Should Know”
 
ITGM8. Всеволод Брекелов (Grid Dinamics) Component tests. let's do that!
ITGM8. Всеволод Брекелов (Grid Dinamics) Component tests. let's do that!ITGM8. Всеволод Брекелов (Grid Dinamics) Component tests. let's do that!
ITGM8. Всеволод Брекелов (Grid Dinamics) Component tests. let's do that!
 
ITGM8. Илья Коробицын (Grid Dinamics) Автоматизатор, копай глубже, копай шире!
ITGM8. Илья Коробицын (Grid Dinamics) Автоматизатор, копай глубже, копай шире!ITGM8. Илья Коробицын (Grid Dinamics) Автоматизатор, копай глубже, копай шире!
ITGM8. Илья Коробицын (Grid Dinamics) Автоматизатор, копай глубже, копай шире!
 
ITGM8. Алексей Лянгузов (Grid Dinamics) Как я ходил в стартап и чем это все з...
ITGM8. Алексей Лянгузов (Grid Dinamics) Как я ходил в стартап и чем это все з...ITGM8. Алексей Лянгузов (Grid Dinamics) Как я ходил в стартап и чем это все з...
ITGM8. Алексей Лянгузов (Grid Dinamics) Как я ходил в стартап и чем это все з...
 
ITGM8. Юлия Атлыгина (ALM Works) Инструменты, облегчающее тестирование
ITGM8. Юлия Атлыгина (ALM Works) Инструменты, облегчающее тестированиеITGM8. Юлия Атлыгина (ALM Works) Инструменты, облегчающее тестирование
ITGM8. Юлия Атлыгина (ALM Works) Инструменты, облегчающее тестирование
 
ITGM8. Сергей Атрощенков (Еpam) Buzzword driven development и место тестировщ...
ITGM8. Сергей Атрощенков (Еpam) Buzzword driven development и место тестировщ...ITGM8. Сергей Атрощенков (Еpam) Buzzword driven development и место тестировщ...
ITGM8. Сергей Атрощенков (Еpam) Buzzword driven development и место тестировщ...
 
Agile testing
Agile testingAgile testing
Agile testing
 
Какая польза от метрик?
Какая польза от метрик?Какая польза от метрик?
Какая польза от метрик?
 
Автоматизируем тестирование интерфейса мобильных приложений
Автоматизируем тестирование интерфейса мобильных приложенийАвтоматизируем тестирование интерфейса мобильных приложений
Автоматизируем тестирование интерфейса мобильных приложений
 
"Опыт создания системы управления сборкой и тестированием" (слайдкаст)
"Опыт создания системы управления сборкой и тестированием" (слайдкаст)"Опыт создания системы управления сборкой и тестированием" (слайдкаст)
"Опыт создания системы управления сборкой и тестированием" (слайдкаст)
 
"Опыт создания системы управления сборкой и тестированием" (полная)
"Опыт создания системы управления сборкой и тестированием" (полная)"Опыт создания системы управления сборкой и тестированием" (полная)
"Опыт создания системы управления сборкой и тестированием" (полная)
 
Нагрузочное тестирование
Нагрузочное тестированиеНагрузочное тестирование
Нагрузочное тестирование
 
Долой отмазки в тестировании!
Долой отмазки в тестировании!Долой отмазки в тестировании!
Долой отмазки в тестировании!
 
Вместе весело шагать, или как собрать тестировщиков в своем городе
Вместе весело шагать, или как собрать тестировщиков в своем городеВместе весело шагать, или как собрать тестировщиков в своем городе
Вместе весело шагать, или как собрать тестировщиков в своем городе
 
Domain-тестирование
Domain-тестированиеDomain-тестирование
Domain-тестирование
 
Оптимизация интерактивного тестирования с использованием метрики Покрытие кода
Оптимизация интерактивного тестирования с использованием метрики Покрытие кодаОптимизация интерактивного тестирования с использованием метрики Покрытие кода
Оптимизация интерактивного тестирования с использованием метрики Покрытие кода
 

Recently uploaded

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
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
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
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
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
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
 
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
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
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
 
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
 
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
 
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
 
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
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdfChristopherTHyatt
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 

Recently uploaded (20)

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
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
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
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?
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
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
 
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
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
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...
 
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...
 
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...
 
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
 
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
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 

Automating JFC UI application testing with Jemmy

  • 1. <Insert Picture Here> Automating JFC UI application testing with Jemmy. Alexandre (Shura) Iline Java SE and JavaFX Quality architect.
  • 2. The following is intended to outline our general product direction. It is intended for information purposes, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle's products remains at the sole discretion of Oracle.
  • 3. This presentation shares experience gotten from testing such products as JRockit JavaFX AT
  • 4. What's in scope • All sorts of definitions “Testing”, “UI testing”, “Test automation” • Jemmy library • Automation approaches effectiveness and cost. • Bunch of source code • Basic Jemmy operations • Less basic operations • Switches and settings • Tricks and tips • Misconceptions
  • 5. What's not in scope • The economical effects • A.k.a. what's “quality” • Why to automate • Automation cost vs. manual testing cost • When to automate • What to automate • Non-economical benefits of automation A.k.a. let's leave it for later. :)
  • 6. UI testing … by Wikipedia «GUI software testing is the process of testing a product that uses a graphical user interface, to ensure it meets its written specifications.»
  • 7. UI testing … most often ... «Checking whether usage of a product UI leads to results expected by the the person who performs testing»
  • 8. Sample test scenario ●Start text editor ●Push «File/Open» ●Verify file chooser directory ●Select some file ●Verify editor area content ●Verify application title ●Verify buttons availabilities ● ....
  • 9. UI test workflow Pass Perform necessary actions Find Pass Do Pass Verify Find next control Verify that expected To perform operation State reached Fail Fail Fail Failure analysis
  • 10. Test automation ... for me «Building a process which exercises and reports certain product characteristics while run unattended.»
  • 11. Test automation is like development • Putting logic in a code • Same lifecycle: • Requirements • Design • Implementation • Same set of problems • Bugs • Instabilities • Scope • defined through test specification/plan
  • 12. Test automation is not like development • Big fat dependency – the tested product • vs many libraries and platform • Many small programs • vs one big program • Does one thing good – reports status • vs does many thing ... good • Perfectness is not the goal • other than maintenance cost, ease of use
  • 13. Jemmy
  • 14. Jemmy history • Started as a tool to tests TeamWare UI (1999) • Used for NetBeans extensions (2000) • Official test tool for NetBeans (2001) • Open-source (2001) • Is used for NetBeans and extensions since then • Adopted as a test tool for Swing (~2003) • Used outside SUN Microsystems (next slide) • Jemmy v3 created (2008) • The test tool for JavaFX SDK (2008 – now) • Extended to support SWT • Test tool for JRMC
  • 15. Jemmy and extensions Jemmy v2 LCDUI NetBeans JemmySG AWT & Swing JDK JemmyAWT JemmyCore JemmyRemote JemmySWT Jemmy v3 JemmyFX JemmyFXRemote JRMC JavaFX Authoring JavaFX Tool
  • 16. Jemmy v2 JFC
  • 17. Same VM. Test code runs in the same VM as the application code • Benefits • Full access to the application UI objects • As well as the application domain object (sometimes). • Control over event queue • Drawbacks • Impacts the tested UI • Options • Run application from test • Run test from application • Use accessibility hook
  • 18. Demo Using Jemmy
  • 19. Operators JFrameOperator JFrameOperator JTextFieldOperator JTextFieldOperator getTitle(), getText(), getTitle(), getText(), ... ... typeText(...), ... typeText(...), ... JButtonOperator JComboBoxOperator JComboBoxOperator JButtonOperator getText(), getSelectedItem(), getSelectedItem(), getText(), push() selectItem(...) selectItem(...) push() Test code Test code
  • 20. Demo Operators
  • 21. Threading “noblocking” operation periodical checks action waiting action waiting action action
  • 22. Demo Waiting Timeouts
  • 23. Event queue User UI Other threads
  • 24. Event queue with test Lookup Actions Verifications Test UI Other threads
  • 25. Demo Event queue tools
  • 26. Drivers TextDriver typeText() WindowDriver ... JFrameOperator JTextFieldOperator ButtonDriver ListDriver push(...) slectItem(...) ... ... JButtonOperator JComboBoxOperator Test code
  • 27. Demo Drivers
  • 28. Dispatching modes • Events • Proper events in a proper order are dispatched to a component making it thinking some user actions are performed. • Shortcut • Same as events except the events are posted into the event queue at once. • Robot • java.awt.Robot is used Implemented with driver sets
  • 29. Demo Dispatching models
  • 30. Image • Fragile • Needed for custom controls • Comparison • Pixel-to-pixel • %s of pixels • Color distance • Average • Maximum
  • 31. Demo Verifying images
  • 32. Automation approaches
  • 33. Application UI Product UI Product UI 33 33
  • 34. Coordinates • click(134,32) //selects some record • click(215,122) //hits “Properties” • sleep(5) //sleeps to let dialog be painted • click(64,182) //expands color combo • click(235,182) //selects Gray • click(235,212) //hit OK 34 34
  • 35. Widgets • Find “Car records” frame • Find table • Select “1abc234” cell • Push “Properties” button • Wait for “1abc234” dialog • Select “Gray” color in combo box • Push “OK” 35 35
  • 36. Widgets or coordinates Car record Domain Domain model model Model Model Make VIN VIN Color Year License plate Make Color Year License plate Product UI Product UI Test 36 36
  • 37. Demo Cars test Widgets
  • 38. UI Primitives • Find car list frame CarListFrame list = new CarListFrame() • Open properties dialog for car “1abc234” CarDialog propDialog = list.carProperties(“1abc234”); • Set color to gray propDialog.setColor(Color.GRAY); • Apply changes propDialog.ok(); 38 38
  • 39. Library Domain Car record Domain Model Make VIN Color Year License plate model Model Make VIN Color Year License plate model Product UI Product UI CarListFrame Test library Test library CarDialog Test 39 39
  • 40. Demo Cars test UI Library
  • 41. Domain model • Set color to gray for a car “1abc234” new CarRecord(“1abc234”). setColor(Color.GRAY); Underneath the cover, CarRecord class does all described earlier 41 41
  • 42. Domain library Domain Car record Domain model Model Make VIN Color Year License plate model Model Make VIN Color Year License plate Product Product UI UI CarList UI test library UI test library CarDialog CarRecord Domain test library Domain test library Test 42 42
  • 43. Demo Cars test Domain Library
  • 44. Automation effectiveness
  • 45. The formula? TM * NR * NC EA = TD + TS * NR * NC EA – automation effectiveness To be used for every particular product. NR and NC are unique for a product. TM is a characteristic of a test suite. Smaller TD and TS - higher the EA. Coefficient depend on the way you write your tests
  • 46. Td and Ts together 8 7.5 7 Td/Tm 6 Ts/Tm 5 5 4 3 3 2 1.1 1 1 0.5 0.1 0.05 0 Coordinates Widgets UI Library Domain library
  • 47. TD and TS for NC=3, NR=8, TM=1 30 25.1 Td 25 24 Ts Td+(Ts*Nc*Nr) 20 15 15 12 10 8.7 7.4 7.5 5 5 3 2.4 1.1 1.2 0 Coordinates Widgets UI Library Domain library
  • 48. EA for NC=3, NR=8 3.5 3.24 3 2.76 2.5 2 1.6 1.5 0.96 1 0.5 0 Coordinates Widgets UI Library Domain library Ea
  • 49. Misconceptions • Automated testing replaces manual testing • it will find all the bugs • it will find more bugs • it does the same amount of work • Create once use forever • This is easy • This is too hard • No need to create test plan • “Will just buy the XXX tool and it will solve all out problems”
  • 50. Resources jemmy.dev.java.net
  • 51. <Insert Picture Here> Automating JFC UI application testing. With Jemmy. The technical aspects. Alexandre (Shura) Iline Java SE and JavaFX Quality architect.
  • 53. Coverage • Implementation coverage • Line, block, condition, sequence, ... • Specification coverage • How well the tests covering the functional specification • Public API coverage • Whether the public API is tested fully • UI coverage • Whether the tests cover UI fully • Combine with bug density • First cover the areas with more bugs • Combine with code complexity • First cover the more complicated code.
  • 54. Continuous build Build Executed Code automatically Success Commit changes after commit Yes. No Analysis. Rollback!!! Development Promote Test further Code is compilable
  • 55. Continuous build with testing Code Build Success changes Commit No Rollback!!! Yes. = Compilation Test Analysis. successful changes No Testing Test further Passed Build is good Yes Is it working? Code line is healthy Go on ...
  • 56. Pre-integration Code changes Yes Testing Passed Commit Test changes No
  • 57. How to benefit from UI automation? Use it! • Sanity • Pre-integration • Attach to bug reports • Make is a quality criteria • Run it for every build • Show it to the boss :) • Don't forget to show it to the dev. team

Editor's Notes

  1. This is to let you know that I know what I am talking about All I am going to say is based on experience I&apos;ve gotten from testing different UI products talk some of which I was either a lead of or participated or been in a contect with people doing the testing because my technology was used
  2. They say there should be a spec. Lucky you if you have a spec detailed enough to write automated tests.
  3. that&apos;s more like it. Testing implementation ...
  4. Just to get on the same page ... This is what I am talking about – functional testing of UI
  5. I do not define test here on purpose otherwise we would drown into it. Quality here defined loosely. More like “conformance to criteria”
  6. I will also be saying that you also need to design it.
  7. big fat dependency – and the version is given Many small programs (one big program) Outcome is just the status (product functionality) no need to be perfect how test veryfies the not too much performance maintanance - yes
  8. Jemmy v2 is really old and very stable. There are no major bugs there. As no new functionality went into JFC for a long time, no new stuff need to be added there either. Such products as NB and JFC are tested with it, to name a few. Jemmy v3 has a totally new design although it is based on the same principles. Main design point is to reuse as much code for different UI libraries as possible. Note that even Jemmy v3 has an AWT/Swing extension, I do recommend everybody to use Jemmy v2. JemmyAWT is only for testing JemmyCore
  9. this requires recording naturally
  10. this could be done manually or through a recording tool
  11. Now would happen if the combobox is replaced by color chooser page up test would fail, &apos;cause it&apos;s looking for combobox page down Most importantly ... all tests would fail!
  12. Obvious solution this kind of code already could not be generated by a recording tool This survives changes within editing dialog
  13. not a unit test not a product classes CarRecord is a test code
  14. as long as there is a car and a color ...
  15. found complicated formulas in the web
  16. did not hear many myself – there plenty described on the web – these I did see joke about buys vs buying
  17. did not hear many myself – there plenty described on the web – these I did see joke about buys vs buying
  18. First of all there very little use to measure only the automated tests coverage Implementation coverage does not have a target value. In order to define what must be covered – need to filter one way or the other.
  19. This is a well accepted practice nowadays. However it is not really possible without testing. And it is not really possible with manual testing as the turnaround is too long to rely on.
  20. This is a well accepted practice nowadays. However it is not really possible without testing. And it is not really possible with manual testing as the turnaround is too long to rely on.