SlideShare una empresa de Scribd logo
1 de 37
Descargar para leer sin conexión
<Insert Picture Here>




UI Test Automation Effectiveness
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




                          JavaFX Authoring Tool
What's effectiveness

• Regular functional testing
   • Saving human time
• Special groups of tests
(Things that could only be done through automated testing)
   • Doing it with less human time
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


●
    ....
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
UI Test automation

• Avoidable
   • Testing could be done with no automation
• Less obvious
   • Many misconceptions
• More expensive
• Requires specific tools
   • Such as the test drivers
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
 ptoblems”
UI changes

• “Improvements”
• Specification/requirement changes
• Bug fixes




If UI is not changing ...
Why bother testing?
Test base characteristics

• Coverage
   • How well the test base tests the product?
• Initial creation cost
   • How expensive it is to initially implement it?
• Sustainability
   • How expensive it is to support it?
• Reliability
   • Does it have intermittent failures?
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.
Initial creation

• Record && replay
   • Inexpensive in creation
   • Lacks functionality
   • (More) expensive to support
   • Disables effective UI test automation
• Coding
   • Expensive to create
   • Require experienced engineers
   • Encourages effective UI testing
   • (Much) Less expensive to support
Tests code needed to be changed

• Test code needs to be updated every time UI
 changes

colorComboBox.selectColor(“Grey”)

turns into

colorButton.push();
...
colorChooser.selectColor(Color.GREY);
Application UI


Product UI
 Product UI




                         18
                    18
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




                                                      19
                                                 19
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”




                                            20
                                       20
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

                                                                                 21
                                                                            21
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();

                                                  22
                                             22
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
                                                                                 23
                                                                            23
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


                                                          24
                                                     24
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

                                                                                 25
                                                                         25
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 t
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
3.5
EA for NC=3, NR=8         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
Other Ts improvements

• Store resources in a property file
• Take from the application itself
Testbase reliability

• Select right tool
• No sleeps – only waitings
• Use event queue
• Right lookup criteria
   • By ID
   • By text
   • By location
   • Not by index
Special test types

• Continuous build tests
  • aka sanity aka acceptance aka smoke
• Pre-integration
• Performance




                                               32
                                          32
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
<Insert Picture Here>




SQE reporting infrastructure improvements
Alexandre (Shura) Iline
Java and JavaFX Quality architect.
shura@sun.com

Más contenido relacionado

Similar a UI Test Automation Effectiveness

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
rit2010
 
Alexandre Iline Rit 2010 Java Fxui
Alexandre Iline Rit 2010 Java FxuiAlexandre Iline Rit 2010 Java Fxui
Alexandre Iline Rit 2010 Java Fxui
guest092df8
 
Alexandre Iline Rit 2010 Java Fxui
Alexandre Iline Rit 2010 Java FxuiAlexandre Iline Rit 2010 Java Fxui
Alexandre Iline Rit 2010 Java Fxui
rit2010
 

Similar a UI Test Automation Effectiveness (20)

Browser Developer Tools for APEX Developers
Browser Developer Tools for APEX DevelopersBrowser Developer Tools for APEX Developers
Browser Developer Tools for APEX Developers
 
Building strong foundations apex enterprise patterns
Building strong foundations apex enterprise patternsBuilding strong foundations apex enterprise patterns
Building strong foundations apex enterprise patterns
 
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
 
Alexandre Iline Rit 2010 Java Fxui
Alexandre Iline Rit 2010 Java FxuiAlexandre Iline Rit 2010 Java Fxui
Alexandre Iline Rit 2010 Java Fxui
 
Alexandre Iline Rit 2010 Java Fxui
Alexandre Iline Rit 2010 Java FxuiAlexandre Iline Rit 2010 Java Fxui
Alexandre Iline Rit 2010 Java Fxui
 
Agile2013 - Integration testing in enterprises using TaaS - via Case Study
Agile2013 - Integration testing in enterprises using TaaS - via Case StudyAgile2013 - Integration testing in enterprises using TaaS - via Case Study
Agile2013 - Integration testing in enterprises using TaaS - via Case Study
 
Bdd test automation analysis
Bdd test automation analysisBdd test automation analysis
Bdd test automation analysis
 
Old code doesn't stink
Old code doesn't stinkOld code doesn't stink
Old code doesn't stink
 
Постоянное тестирование интеграции
Постоянное тестирование интеграцииПостоянное тестирование интеграции
Постоянное тестирование интеграции
 
Coding Naked
Coding NakedCoding Naked
Coding Naked
 
Advanced Coded UI Testing
Advanced Coded UI TestingAdvanced Coded UI Testing
Advanced Coded UI Testing
 
How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...
How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...
How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...
 
JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...
JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...
JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...
 
Automation of Discovery Technology Lab Workflows
Automation of Discovery Technology Lab WorkflowsAutomation of Discovery Technology Lab Workflows
Automation of Discovery Technology Lab Workflows
 
Topcased
TopcasedTopcased
Topcased
 
AdaCore Paris Tech Day 2016: Jose Ruiz - QGen Tech Update
AdaCore Paris Tech Day 2016: Jose Ruiz - QGen Tech UpdateAdaCore Paris Tech Day 2016: Jose Ruiz - QGen Tech Update
AdaCore Paris Tech Day 2016: Jose Ruiz - QGen Tech Update
 
Visual studio 2012 - What's in it for me?
Visual studio 2012 - What's in it for me?Visual studio 2012 - What's in it for me?
Visual studio 2012 - What's in it for me?
 
PopcornSAR Specialized in AUTOSAR_Company profile
PopcornSAR Specialized in AUTOSAR_Company profilePopcornSAR Specialized in AUTOSAR_Company profile
PopcornSAR Specialized in AUTOSAR_Company profile
 
Groovy In the Cloud
Groovy In the CloudGroovy In the Cloud
Groovy In the Cloud
 
Integration testing in enterprises using TaaS
Integration testing in enterprises using TaaS Integration testing in enterprises using TaaS
Integration testing in enterprises using TaaS
 

Más de SQALab

Más de SQALab (20)

Готовим стажировку
Готовим стажировкуГотовим стажировку
Готовим стажировку
 
Куда приводят мечты? или Искусство развития тестировщика
Куда приводят мечты? или Искусство развития тестировщикаКуда приводят мечты? или Искусство развития тестировщика
Куда приводят мечты? или Искусство развития тестировщика
 
Оптимизация Selenium тестов и ускорение их поддержки
Оптимизация Selenium тестов и ускорение их поддержкиОптимизация Selenium тестов и ускорение их поддержки
Оптимизация Selenium тестов и ускорение их поддержки
 
Автоматизация 0.0: 0 - бюджет, 0 - опыт программирования
Автоматизация 0.0: 0 - бюджет, 0 - опыт программированияАвтоматизация 0.0: 0 - бюджет, 0 - опыт программирования
Автоматизация 0.0: 0 - бюджет, 0 - опыт программирования
 
Нагрузочное тестирование нестандартных протоколов с использованием Citrix и J...
Нагрузочное тестирование нестандартных протоколов с использованием Citrix и J...Нагрузочное тестирование нестандартных протоколов с использованием Citrix и J...
Нагрузочное тестирование нестандартных протоколов с использованием Citrix и J...
 
Continuous performance testing
Continuous performance testingContinuous performance testing
Continuous performance testing
 
Конфиги вместо костылей. Pytestconfig и зачем он нужен
Конфиги вместо костылей. Pytestconfig и зачем он нуженКонфиги вместо костылей. Pytestconfig и зачем он нужен
Конфиги вместо костылей. Pytestconfig и зачем он нужен
 
Команда чемпионов в ИТ стихии
Команда чемпионов в ИТ стихииКоманда чемпионов в ИТ стихии
Команда чемпионов в ИТ стихии
 
API. Серебряная пуля в магазине советов
API. Серебряная пуля в магазине советовAPI. Серебряная пуля в магазине советов
API. Серебряная пуля в магазине советов
 
Добиваемся эффективности каждого из 9000+ UI-тестов
Добиваемся эффективности каждого из 9000+ UI-тестовДобиваемся эффективности каждого из 9000+ UI-тестов
Добиваемся эффективности каждого из 9000+ UI-тестов
 
Делаем автоматизацию проектных KPIs
Делаем автоматизацию проектных KPIsДелаем автоматизацию проектных KPIs
Делаем автоматизацию проектных KPIs
 
Вредные привычки в тест-менеджменте
Вредные привычки в тест-менеджментеВредные привычки в тест-менеджменте
Вредные привычки в тест-менеджменте
 
Мощь переполняет с JDI 2.0 - новая эра UI автоматизации
Мощь переполняет с JDI 2.0 - новая эра UI автоматизацииМощь переполняет с JDI 2.0 - новая эра UI автоматизации
Мощь переполняет с JDI 2.0 - новая эра UI автоматизации
 
Как hh.ru дошли до 500 релизов в квартал без потери в качестве
Как hh.ru дошли до 500 релизов в квартал без потери в качествеКак hh.ru дошли до 500 релизов в квартал без потери в качестве
Как hh.ru дошли до 500 релизов в квартал без потери в качестве
 
Стили лидерства и тестирование
Стили лидерства и тестированиеСтили лидерства и тестирование
Стили лидерства и тестирование
 
"Давайте не будем про качество"
"Давайте не будем про качество""Давайте не будем про качество"
"Давайте не будем про качество"
 
Apache.JMeter для .NET-проектов
Apache.JMeter для .NET-проектовApache.JMeter для .NET-проектов
Apache.JMeter для .NET-проектов
 
Тестирование геолокационных систем
Тестирование геолокационных системТестирование геолокационных систем
Тестирование геолокационных систем
 
Лидер или босс? Вот в чем вопрос
Лидер или босс? Вот в чем вопросЛидер или босс? Вот в чем вопрос
Лидер или босс? Вот в чем вопрос
 
От Зефира в коробке к Structure Zephyr или как тест-менеджеру перекроить внут...
От Зефира в коробке к Structure Zephyr или как тест-менеджеру перекроить внут...От Зефира в коробке к Structure Zephyr или как тест-менеджеру перекроить внут...
От Зефира в коробке к Structure Zephyr или как тест-менеджеру перекроить внут...
 

Último

The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
SanaAli374401
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
MateoGardella
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
MateoGardella
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 

Último (20)

Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 

UI Test Automation Effectiveness

  • 1. <Insert Picture Here> UI Test Automation Effectiveness 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 JavaFX Authoring Tool
  • 4. What's effectiveness • Regular functional testing • Saving human time • Special groups of tests (Things that could only be done through automated testing) • Doing it with less human time
  • 5. 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.»
  • 6. UI testing … most often ... «Checking whether usage of a product UI leads to results expected by the the person who performs testing»
  • 7. 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 ● ....
  • 8. Test automation ... for me «Building a process which exercises and reports certain product characteristics while run unattended.»
  • 9. 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
  • 10. 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
  • 11. UI Test automation • Avoidable • Testing could be done with no automation • Less obvious • Many misconceptions • More expensive • Requires specific tools • Such as the test drivers
  • 12. 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 ptoblems”
  • 13. UI changes • “Improvements” • Specification/requirement changes • Bug fixes If UI is not changing ... Why bother testing?
  • 14. Test base characteristics • Coverage • How well the test base tests the product? • Initial creation cost • How expensive it is to initially implement it? • Sustainability • How expensive it is to support it? • Reliability • Does it have intermittent failures?
  • 15. 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.
  • 16. Initial creation • Record && replay • Inexpensive in creation • Lacks functionality • (More) expensive to support • Disables effective UI test automation • Coding • Expensive to create • Require experienced engineers • Encourages effective UI testing • (Much) Less expensive to support
  • 17. Tests code needed to be changed • Test code needs to be updated every time UI changes colorComboBox.selectColor(“Grey”) turns into colorButton.push(); ... colorChooser.selectColor(Color.GREY);
  • 18. Application UI Product UI Product UI 18 18
  • 19. 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 19 19
  • 20. 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” 20 20
  • 21. 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 21 21
  • 22. 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(); 22 22
  • 23. 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 23 23
  • 24. 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 24 24
  • 25. 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 25 25
  • 26. 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 t
  • 27. 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
  • 28. 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
  • 29. 3.5 EA for NC=3, NR=8 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
  • 30. Other Ts improvements • Store resources in a property file • Take from the application itself
  • 31. Testbase reliability • Select right tool • No sleeps – only waitings • Use event queue • Right lookup criteria • By ID • By text • By location • Not by index
  • 32. Special test types • Continuous build tests • aka sanity aka acceptance aka smoke • Pre-integration • Performance 32 32
  • 33. Continuous build Build Executed Code automatically Success Commit changes after commit Yes. No Analysis. Rollback!!! Development Promote Test further Code is compilable
  • 34. 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 ...
  • 35. Pre-integration Code changes Yes Testing Passed Commit Test changes No
  • 36. 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
  • 37. <Insert Picture Here> SQE reporting infrastructure improvements Alexandre (Shura) Iline Java and JavaFX Quality architect. shura@sun.com