SlideShare a Scribd company logo
Testing JavaFX UI Tips from JavaFX quality team Alexandre (Shura) Iline Java and JavaFX quality architect Oracle
Agenda ,[object Object]
Test automation approaches
Jemmy library
Test automation effectiveness
Test library design approaches
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 »
[object Object]
Push «File/Open»
Verify file chooser directory
Select some file
Verify editor area content
Verify application title
Verify buttons availabilities
....
UI Testing Manual Automated Initial step Design test specification. Create tests.  Establish regular runs.  Ongoing Click, click, click Analize results File bugs Change the specification Change the tests Qualification High, low for test executors High Effectiveness Low High Other Inexpensive to start Continuous quality monitoring , inexpensive to reuse Fun Bo-o-o-ring Much like programming
Continuous build No Yes. Development Success
Continuous build with testing No No Yes Yes. = Compilation successful Success Passed
Automation approach Record && Replay Coding Test creation Inexpensive* Usually just repeating manual test in special environment Must be accompanied by other means Expensive* Consists of programming Test execution Does not depend on approach Test maintanance Higher (in most cases)* Very much depends on test format Lower* Depends on principles of building test library Test analysis Does not depend on approach (*) Much more information closer to the end of this presentation
Jemmy
Jemmy v2 Started as a tool to tests TeamWare UI (1999) Used for NetBeans extensions (2000) Official test tool for NetBeans (2001) Open-source (2001) Jemmy v3 Started in (2008) as a proof of concept experiemnt Extended to support JavaFX (2009) Opensource with support of JavaFX 1.2 (2009) Developed in close-source for 1.3 since then
Jemmy usages ,[object Object]
External:  ,[object Object]
Evaluated by: syntelinc.com, covast.com, visus-tt.com, covast.com, nokia.com, twt.com, ubs.com ,[object Object],[object Object]
Demo... Finally!
Jemmy v3 Covered in this presentation JavaFX AWT/Swing SWT Scenegraph LCDUI JemmyCore Interfaces AWT robot FX robot Hierarchy Input Scene, node containers Scroller, slider,  list, text, ... Generic interfaces
UI test  Find Do Verify Pass Pass Pass Fail Fail Fail Failure analysis Find next control To perform operation On in Verify that expected State reached Perform necessary  actions
Lookup ,[object Object]
«open_file_btn» ,[object Object],[object Object]
Button, text, combo box, etc ,[object Object],[object Object]
2 nd  button with text «browse» ,[object Object]
projectmanager.Main$Main$Script$1Scene$ObjLit$20@4d16318b ,[object Object],[object Object]
Button with text «browse»
UI could be very complicated
UI could be very complicated
UI could be very complicated
Lookup demo
Interfaces Interface Control types Description Mouse, Keyboard, Drag Enything Low level input Parent Containers, list (for its content) Something you could look within Selectable Toggle button, radio button, combobox, check box, lists, etc A control which provides limited number of choices CaretOwner Text box, scroll bar, slider A control which has a number value which changes within some range Text Text box Editable text container
Interfaces demo
Verifications UI feedback Non UI feedback Dialog displayed Test changed Image updated Progress bar changed position File created Database updated Sunset happened :)
Waiting ,[object Object],Things happen in background Test code is in another thread ,[object Object]
Everything should be waited for
Verification demo
Test automation effectiveness
E A  – automation effectiveness N R  and N C  are characteristics for a product. T M  is a characteristic of a test suite T D  and  T S  depend on test automation approach Smaller  T D  and  T S  - higher the  E A . T D + * T S N R T M * N R N C * E A = N C *
Assumptions:  T M  = 1 engineer*week  T S  = 0.1 *  T M   T D  = 5 *  T M   N R  = 8
T d  or T s  – what to minimize T S   -  if (N C  * N R ) is big  Multi-platform Compatibility with external products (servers, browsers, ...) Long-living T D   -  if (N C  * N R ) is small  Proof of concept Preview
Tests fail every now and then ... …  because the tested UI is changed
Tests fail every now and then ... Ah! And also because errors are made ...
End2End demo
T s  continuends Time spent on What to do %% of time Allocating failures Use test harness 1% - 5% Anderstandint the failure reason Use test logging, save images, save UI state 10% - 80% Fix the tests Move common code to the library ( * ) 90% - 10% (*) The only way it is different from programming is that there are a lot of tests.  More on this later.
Harness TestNG
Understanding failure Logging UI operations Going to push ... button Selecting ... menu UI responces Found list view: … UI hierarchy Scene «…» Group «…» Button «…» UI states Images
Demo Jemmy logging functionality
Fix the tests One UI, many-many tests. Do as few test code changes as possible Ideally … one change in test code for one change in UI code.

More Related Content

What's hot

Getting started with test complete 7
Getting started with test complete 7Getting started with test complete 7
Getting started with test complete 7
Hoamuoigio Hoa
 
Basic controls of Visual Basic 6.0
Basic controls of Visual Basic 6.0Basic controls of Visual Basic 6.0
Basic controls of Visual Basic 6.0
Salim M
 
Acceptance Testing With Selenium
Acceptance Testing With SeleniumAcceptance Testing With Selenium
Acceptance Testing With Selenium
elliando dias
 
Qtp Basics
Qtp BasicsQtp Basics
Qtp Basics
mehramit
 
Rv11
Rv11Rv11
Visual basic 6 black book
Visual basic 6 black bookVisual basic 6 black book
Visual basic 6 black book
Ajay Goyal
 
Buttons In .net Visual Basic
Buttons In .net Visual BasicButtons In .net Visual Basic
Buttons In .net Visual Basic
manish maurya
 
QTP Training by INFOTECH
QTP Training by INFOTECHQTP Training by INFOTECH
QTP Training by INFOTECH
Pravinsinh
 
QTP with Descriptive programming
QTP with Descriptive programmingQTP with Descriptive programming
QTP with Descriptive programming
Kuldeep Sharma
 
Computer homework
Computer homeworkComputer homework
Computer homework
adarsh-kaul
 
QTP Slides Presentation.
QTP Slides Presentation.QTP Slides Presentation.
QTP Slides Presentation.
tjdhans
 
Mastering your Eclipse IDE - Java tooling, Tips & Tricks - EclipseCon Europe ...
Mastering your Eclipse IDE - Java tooling, Tips & Tricks - EclipseCon Europe ...Mastering your Eclipse IDE - Java tooling, Tips & Tricks - EclipseCon Europe ...
Mastering your Eclipse IDE - Java tooling, Tips & Tricks - EclipseCon Europe ...
Noopur Gupta
 
06 win forms
06 win forms06 win forms
06 win forms
mrjw
 
Oh so you test? - A guide to testing on Android from Unit to Mutation
Oh so you test? - A guide to testing on Android from Unit to MutationOh so you test? - A guide to testing on Android from Unit to Mutation
Oh so you test? - A guide to testing on Android from Unit to Mutation
Paul Blundell
 
1 a slides
1 a slides1 a slides
1 a slides
kavindrakrishna
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
Anand Kumar Rajana
 
Testes? Mas isso não aumenta o tempo de projecto? Não quero...
Testes? Mas isso não aumenta o tempo de projecto? Não quero...Testes? Mas isso não aumenta o tempo de projecto? Não quero...
Testes? Mas isso não aumenta o tempo de projecto? Não quero...
Comunidade NetPonto
 
Windowforms controls c#
Windowforms controls c#Windowforms controls c#
Windowforms controls c#
prabhu rajendran
 
Qtp Training Deepti 3 Of 44256
Qtp Training Deepti 3 Of 44256Qtp Training Deepti 3 Of 44256
Qtp Training Deepti 3 Of 44256
Azhar Satti
 

What's hot (19)

Getting started with test complete 7
Getting started with test complete 7Getting started with test complete 7
Getting started with test complete 7
 
Basic controls of Visual Basic 6.0
Basic controls of Visual Basic 6.0Basic controls of Visual Basic 6.0
Basic controls of Visual Basic 6.0
 
Acceptance Testing With Selenium
Acceptance Testing With SeleniumAcceptance Testing With Selenium
Acceptance Testing With Selenium
 
Qtp Basics
Qtp BasicsQtp Basics
Qtp Basics
 
Rv11
Rv11Rv11
Rv11
 
Visual basic 6 black book
Visual basic 6 black bookVisual basic 6 black book
Visual basic 6 black book
 
Buttons In .net Visual Basic
Buttons In .net Visual BasicButtons In .net Visual Basic
Buttons In .net Visual Basic
 
QTP Training by INFOTECH
QTP Training by INFOTECHQTP Training by INFOTECH
QTP Training by INFOTECH
 
QTP with Descriptive programming
QTP with Descriptive programmingQTP with Descriptive programming
QTP with Descriptive programming
 
Computer homework
Computer homeworkComputer homework
Computer homework
 
QTP Slides Presentation.
QTP Slides Presentation.QTP Slides Presentation.
QTP Slides Presentation.
 
Mastering your Eclipse IDE - Java tooling, Tips & Tricks - EclipseCon Europe ...
Mastering your Eclipse IDE - Java tooling, Tips & Tricks - EclipseCon Europe ...Mastering your Eclipse IDE - Java tooling, Tips & Tricks - EclipseCon Europe ...
Mastering your Eclipse IDE - Java tooling, Tips & Tricks - EclipseCon Europe ...
 
06 win forms
06 win forms06 win forms
06 win forms
 
Oh so you test? - A guide to testing on Android from Unit to Mutation
Oh so you test? - A guide to testing on Android from Unit to MutationOh so you test? - A guide to testing on Android from Unit to Mutation
Oh so you test? - A guide to testing on Android from Unit to Mutation
 
1 a slides
1 a slides1 a slides
1 a slides
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Testes? Mas isso não aumenta o tempo de projecto? Não quero...
Testes? Mas isso não aumenta o tempo de projecto? Não quero...Testes? Mas isso não aumenta o tempo de projecto? Não quero...
Testes? Mas isso não aumenta o tempo de projecto? Não quero...
 
Windowforms controls c#
Windowforms controls c#Windowforms controls c#
Windowforms controls c#
 
Qtp Training Deepti 3 Of 44256
Qtp Training Deepti 3 Of 44256Qtp Training Deepti 3 Of 44256
Qtp Training Deepti 3 Of 44256
 

Viewers also liked

E L P R E S E N T E S I M P L E
E L  P R E S E N T E  S I M P L EE L  P R E S E N T E  S I M P L E
E L P R E S E N T E S I M P L E
preciosa1994
 
Gfgsdfg
GfgsdfgGfgsdfg
2T10 final
2T10 final2T10 final
2T10 final
Localiza
 
Man arc introduction
Man arc introductionMan arc introduction
Man arc introduction
Chiranjibi Panda
 
Bilingul (repaired)
Bilingul (repaired)Bilingul (repaired)
Bilingul (repaired)
Ruth Miniano
 
Trabajo inves manufactura
Trabajo inves manufacturaTrabajo inves manufactura
Trabajo inves manufactura
ROSANGELA2
 
Business Model Collaborative Business Management
Business Model   Collaborative Business ManagementBusiness Model   Collaborative Business Management
Business Model Collaborative Business Management
John Clausen
 

Viewers also liked (7)

E L P R E S E N T E S I M P L E
E L  P R E S E N T E  S I M P L EE L  P R E S E N T E  S I M P L E
E L P R E S E N T E S I M P L E
 
Gfgsdfg
GfgsdfgGfgsdfg
Gfgsdfg
 
2T10 final
2T10 final2T10 final
2T10 final
 
Man arc introduction
Man arc introductionMan arc introduction
Man arc introduction
 
Bilingul (repaired)
Bilingul (repaired)Bilingul (repaired)
Bilingul (repaired)
 
Trabajo inves manufactura
Trabajo inves manufacturaTrabajo inves manufactura
Trabajo inves manufactura
 
Business Model Collaborative Business Management
Business Model   Collaborative Business ManagementBusiness Model   Collaborative Business Management
Business Model Collaborative Business Management
 

Similar to Alexandre Iline Rit 2010 Java Fxui

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
 
Functional Testing Swing Applications with Frankenstein
Functional Testing Swing Applications with FrankensteinFunctional Testing Swing Applications with Frankenstein
Functional Testing Swing Applications with Frankenstein
vivek_prahlad
 
Pragmatic Parallels: Java and JavaScript
Pragmatic Parallels: Java and JavaScriptPragmatic Parallels: Java and JavaScript
Pragmatic Parallels: Java and JavaScript
davejohnson
 
Stopping the Rot - Putting Legacy C++ Under Test
Stopping the Rot - Putting Legacy C++ Under TestStopping the Rot - Putting Legacy C++ Under Test
Stopping the Rot - Putting Legacy C++ Under Test
Seb Rose
 
Tdd is not about testing (OOP)
Tdd is not about testing (OOP)Tdd is not about testing (OOP)
Tdd is not about testing (OOP)
Gianluca Padovani
 
Plug yourself in and your app will never be the same (1 hr edition)
Plug yourself in and your app will never be the same (1 hr edition)Plug yourself in and your app will never be the same (1 hr edition)
Plug yourself in and your app will never be the same (1 hr edition)
Mikkel Flindt Heisterberg
 
Modern Python Testing
Modern Python TestingModern Python Testing
Modern Python Testing
Alexander Loechel
 
Test Complete
Test CompleteTest Complete
Test Complete
RomSoft SRL
 
N Unit Presentation
N Unit PresentationN Unit Presentation
N Unit Presentation
priya_trivedi
 
Testing
Testing Testing
Testing
vamshi batchu
 
Finance & Testing 2009 Highspeed Testautomation
Finance & Testing 2009 Highspeed TestautomationFinance & Testing 2009 Highspeed Testautomation
Finance & Testing 2009 Highspeed Testautomation
guesta64aefc
 
FT 2009 Highspeed Test Automation
FT 2009 Highspeed Test AutomationFT 2009 Highspeed Test Automation
FT 2009 Highspeed Test Automation
Michel Löhr
 
Visual basic 6.0
Visual basic 6.0Visual basic 6.0
Visual basic 6.0
Aarti P
 
Tips and Tricks for Using Visual Studio.Net Effectively
Tips and Tricks for Using Visual Studio.Net EffectivelyTips and Tricks for Using Visual Studio.Net Effectively
Tips and Tricks for Using Visual Studio.Net Effectively
weili_at_slideshare
 
Plug-in Architectures
Plug-in ArchitecturesPlug-in Architectures
Plug-in Architectures
elliando dias
 
Software Testing 5/5
Software Testing 5/5Software Testing 5/5
Software Testing 5/5
Damian T. Gordon
 
software-tools-part-1.ppt
software-tools-part-1.pptsoftware-tools-part-1.ppt
software-tools-part-1.ppt
SadiaZar1
 
myslide1
myslide1myslide1
myslide1
Sandeep Putrevu
 
myslide6
myslide6myslide6
myslide6
Sandeep Putrevu
 

Similar to Alexandre Iline Rit 2010 Java Fxui (20)

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
 
Functional Testing Swing Applications with Frankenstein
Functional Testing Swing Applications with FrankensteinFunctional Testing Swing Applications with Frankenstein
Functional Testing Swing Applications with Frankenstein
 
Pragmatic Parallels: Java and JavaScript
Pragmatic Parallels: Java and JavaScriptPragmatic Parallels: Java and JavaScript
Pragmatic Parallels: Java and JavaScript
 
Stopping the Rot - Putting Legacy C++ Under Test
Stopping the Rot - Putting Legacy C++ Under TestStopping the Rot - Putting Legacy C++ Under Test
Stopping the Rot - Putting Legacy C++ Under Test
 
Tdd is not about testing (OOP)
Tdd is not about testing (OOP)Tdd is not about testing (OOP)
Tdd is not about testing (OOP)
 
Plug yourself in and your app will never be the same (1 hr edition)
Plug yourself in and your app will never be the same (1 hr edition)Plug yourself in and your app will never be the same (1 hr edition)
Plug yourself in and your app will never be the same (1 hr edition)
 
Modern Python Testing
Modern Python TestingModern Python Testing
Modern Python Testing
 
Test Complete
Test CompleteTest Complete
Test Complete
 
N Unit Presentation
N Unit PresentationN Unit Presentation
N Unit Presentation
 
Testing
Testing Testing
Testing
 
Finance & Testing 2009 Highspeed Testautomation
Finance & Testing 2009 Highspeed TestautomationFinance & Testing 2009 Highspeed Testautomation
Finance & Testing 2009 Highspeed Testautomation
 
FT 2009 Highspeed Test Automation
FT 2009 Highspeed Test AutomationFT 2009 Highspeed Test Automation
FT 2009 Highspeed Test Automation
 
Visual basic 6.0
Visual basic 6.0Visual basic 6.0
Visual basic 6.0
 
Tips and Tricks for Using Visual Studio.Net Effectively
Tips and Tricks for Using Visual Studio.Net EffectivelyTips and Tricks for Using Visual Studio.Net Effectively
Tips and Tricks for Using Visual Studio.Net Effectively
 
Plug-in Architectures
Plug-in ArchitecturesPlug-in Architectures
Plug-in Architectures
 
Software Testing 5/5
Software Testing 5/5Software Testing 5/5
Software Testing 5/5
 
software-tools-part-1.ppt
software-tools-part-1.pptsoftware-tools-part-1.ppt
software-tools-part-1.ppt
 
myslide1
myslide1myslide1
myslide1
 
myslide6
myslide6myslide6
myslide6
 

More from rit2010

Sphinx new
Sphinx newSphinx new
Sphinx new
rit2010
 
Microsoft cluster systems ritconf
Microsoft cluster systems ritconfMicrosoft cluster systems ritconf
Microsoft cluster systems ritconfrit2010
 
анатомия интернет банка Publish
анатомия интернет банка Publishанатомия интернет банка Publish
анатомия интернет банка Publishrit2010
 
анатомия интернет банка Publish
анатомия интернет банка Publishанатомия интернет банка Publish
анатомия интернет банка Publishrit2010
 
Anatol filin pragmatic documentation 1_r
Anatol filin  pragmatic documentation 1_rAnatol filin  pragmatic documentation 1_r
Anatol filin pragmatic documentation 1_rrit2010
 
Ilia kantor паттерны серверных comet решений
Ilia kantor паттерны серверных comet решенийIlia kantor паттерны серверных comet решений
Ilia kantor паттерны серверных comet решенийrit2010
 
Alexei shilov 2010 rit-rakudo
Alexei shilov 2010 rit-rakudoAlexei shilov 2010 rit-rakudo
Alexei shilov 2010 rit-rakudo
rit2010
 
Konstantin kolomeetz послание внутреннему заказчику
Konstantin kolomeetz послание внутреннему заказчикуKonstantin kolomeetz послание внутреннему заказчику
Konstantin kolomeetz послание внутреннему заказчикуrit2010
 
Bykov monitoring mailru
Bykov monitoring mailruBykov monitoring mailru
Bykov monitoring mailrurit2010
 
Alexander shigin slides
Alexander shigin slidesAlexander shigin slides
Alexander shigin slidesrit2010
 
иван василевич Eye tracking и нейрокомпьютерный интерфейс
иван василевич Eye tracking и нейрокомпьютерный интерфейсиван василевич Eye tracking и нейрокомпьютерный интерфейс
иван василевич Eye tracking и нейрокомпьютерный интерфейсrit2010
 
Andrey Petrov P D P
Andrey Petrov P D PAndrey Petrov P D P
Andrey Petrov P D Prit2010
 
Andrey Petrov методология P D P, часть 1, цели вместо кейсов
Andrey Petrov методология P D P, часть 1, цели вместо кейсовAndrey Petrov методология P D P, часть 1, цели вместо кейсов
Andrey Petrov методология P D P, часть 1, цели вместо кейсовrit2010
 
Dmitry lohansky rit2010
Dmitry lohansky rit2010Dmitry lohansky rit2010
Dmitry lohansky rit2010rit2010
 
Dmitry Lohansky Rit2010
Dmitry Lohansky Rit2010Dmitry Lohansky Rit2010
Dmitry Lohansky Rit2010rit2010
 
Related Queries Braslavski Yandex
Related Queries Braslavski YandexRelated Queries Braslavski Yandex
Related Queries Braslavski Yandexrit2010
 
молчанов сергей датацентры 10 04 2010 Light
молчанов сергей датацентры 10 04 2010  Lightмолчанов сергей датацентры 10 04 2010  Light
молчанов сергей датацентры 10 04 2010 Lightrit2010
 
Sergey Ilinsky Rit 2010 Complex Gui Development Ample Sdk
Sergey Ilinsky Rit 2010 Complex Gui Development Ample SdkSergey Ilinsky Rit 2010 Complex Gui Development Ample Sdk
Sergey Ilinsky Rit 2010 Complex Gui Development Ample Sdkrit2010
 
Serge P Nekoval Grails
Serge P  Nekoval GrailsSerge P  Nekoval Grails
Serge P Nekoval Grailsrit2010
 
Pavel Braslavski Related Queries Braslavski Yandex
Pavel Braslavski Related Queries Braslavski YandexPavel Braslavski Related Queries Braslavski Yandex
Pavel Braslavski Related Queries Braslavski Yandexrit2010
 

More from rit2010 (20)

Sphinx new
Sphinx newSphinx new
Sphinx new
 
Microsoft cluster systems ritconf
Microsoft cluster systems ritconfMicrosoft cluster systems ritconf
Microsoft cluster systems ritconf
 
анатомия интернет банка Publish
анатомия интернет банка Publishанатомия интернет банка Publish
анатомия интернет банка Publish
 
анатомия интернет банка Publish
анатомия интернет банка Publishанатомия интернет банка Publish
анатомия интернет банка Publish
 
Anatol filin pragmatic documentation 1_r
Anatol filin  pragmatic documentation 1_rAnatol filin  pragmatic documentation 1_r
Anatol filin pragmatic documentation 1_r
 
Ilia kantor паттерны серверных comet решений
Ilia kantor паттерны серверных comet решенийIlia kantor паттерны серверных comet решений
Ilia kantor паттерны серверных comet решений
 
Alexei shilov 2010 rit-rakudo
Alexei shilov 2010 rit-rakudoAlexei shilov 2010 rit-rakudo
Alexei shilov 2010 rit-rakudo
 
Konstantin kolomeetz послание внутреннему заказчику
Konstantin kolomeetz послание внутреннему заказчикуKonstantin kolomeetz послание внутреннему заказчику
Konstantin kolomeetz послание внутреннему заказчику
 
Bykov monitoring mailru
Bykov monitoring mailruBykov monitoring mailru
Bykov monitoring mailru
 
Alexander shigin slides
Alexander shigin slidesAlexander shigin slides
Alexander shigin slides
 
иван василевич Eye tracking и нейрокомпьютерный интерфейс
иван василевич Eye tracking и нейрокомпьютерный интерфейсиван василевич Eye tracking и нейрокомпьютерный интерфейс
иван василевич Eye tracking и нейрокомпьютерный интерфейс
 
Andrey Petrov P D P
Andrey Petrov P D PAndrey Petrov P D P
Andrey Petrov P D P
 
Andrey Petrov методология P D P, часть 1, цели вместо кейсов
Andrey Petrov методология P D P, часть 1, цели вместо кейсовAndrey Petrov методология P D P, часть 1, цели вместо кейсов
Andrey Petrov методология P D P, часть 1, цели вместо кейсов
 
Dmitry lohansky rit2010
Dmitry lohansky rit2010Dmitry lohansky rit2010
Dmitry lohansky rit2010
 
Dmitry Lohansky Rit2010
Dmitry Lohansky Rit2010Dmitry Lohansky Rit2010
Dmitry Lohansky Rit2010
 
Related Queries Braslavski Yandex
Related Queries Braslavski YandexRelated Queries Braslavski Yandex
Related Queries Braslavski Yandex
 
молчанов сергей датацентры 10 04 2010 Light
молчанов сергей датацентры 10 04 2010  Lightмолчанов сергей датацентры 10 04 2010  Light
молчанов сергей датацентры 10 04 2010 Light
 
Sergey Ilinsky Rit 2010 Complex Gui Development Ample Sdk
Sergey Ilinsky Rit 2010 Complex Gui Development Ample SdkSergey Ilinsky Rit 2010 Complex Gui Development Ample Sdk
Sergey Ilinsky Rit 2010 Complex Gui Development Ample Sdk
 
Serge P Nekoval Grails
Serge P  Nekoval GrailsSerge P  Nekoval Grails
Serge P Nekoval Grails
 
Pavel Braslavski Related Queries Braslavski Yandex
Pavel Braslavski Related Queries Braslavski YandexPavel Braslavski Related Queries Braslavski Yandex
Pavel Braslavski Related Queries Braslavski Yandex
 

Alexandre Iline Rit 2010 Java Fxui

  • 1. Testing JavaFX UI Tips from JavaFX quality team Alexandre (Shura) Iline Java and JavaFX quality architect Oracle
  • 2.
  • 6. Test library design approaches
  • 7. 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.»
  • 8. UI testing … most often ... «Checking whether usage of a product UI leads to results expected by the the person who performs testing »
  • 9.
  • 11. Verify file chooser directory
  • 16. ....
  • 17. UI Testing Manual Automated Initial step Design test specification. Create tests. Establish regular runs. Ongoing Click, click, click Analize results File bugs Change the specification Change the tests Qualification High, low for test executors High Effectiveness Low High Other Inexpensive to start Continuous quality monitoring , inexpensive to reuse Fun Bo-o-o-ring Much like programming
  • 18. Continuous build No Yes. Development Success
  • 19. Continuous build with testing No No Yes Yes. = Compilation successful Success Passed
  • 20. Automation approach Record && Replay Coding Test creation Inexpensive* Usually just repeating manual test in special environment Must be accompanied by other means Expensive* Consists of programming Test execution Does not depend on approach Test maintanance Higher (in most cases)* Very much depends on test format Lower* Depends on principles of building test library Test analysis Does not depend on approach (*) Much more information closer to the end of this presentation
  • 21. Jemmy
  • 22. Jemmy v2 Started as a tool to tests TeamWare UI (1999) Used for NetBeans extensions (2000) Official test tool for NetBeans (2001) Open-source (2001) Jemmy v3 Started in (2008) as a proof of concept experiemnt Extended to support JavaFX (2009) Opensource with support of JavaFX 1.2 (2009) Developed in close-source for 1.3 since then
  • 23.
  • 24.
  • 25.
  • 27. Jemmy v3 Covered in this presentation JavaFX AWT/Swing SWT Scenegraph LCDUI JemmyCore Interfaces AWT robot FX robot Hierarchy Input Scene, node containers Scroller, slider, list, text, ... Generic interfaces
  • 28. UI test Find Do Verify Pass Pass Pass Fail Fail Fail Failure analysis Find next control To perform operation On in Verify that expected State reached Perform necessary actions
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34. Button with text «browse»
  • 35. UI could be very complicated
  • 36. UI could be very complicated
  • 37. UI could be very complicated
  • 39. Interfaces Interface Control types Description Mouse, Keyboard, Drag Enything Low level input Parent Containers, list (for its content) Something you could look within Selectable Toggle button, radio button, combobox, check box, lists, etc A control which provides limited number of choices CaretOwner Text box, scroll bar, slider A control which has a number value which changes within some range Text Text box Editable text container
  • 41. Verifications UI feedback Non UI feedback Dialog displayed Test changed Image updated Progress bar changed position File created Database updated Sunset happened :)
  • 42.
  • 43. Everything should be waited for
  • 46. E A – automation effectiveness N R and N C are characteristics for a product. T M is a characteristic of a test suite T D and T S depend on test automation approach Smaller T D and T S - higher the E A . T D + * T S N R T M * N R N C * E A = N C *
  • 47. Assumptions: T M = 1 engineer*week T S = 0.1 * T M T D = 5 * T M N R = 8
  • 48. T d or T s – what to minimize T S - if (N C * N R ) is big Multi-platform Compatibility with external products (servers, browsers, ...) Long-living T D - if (N C * N R ) is small Proof of concept Preview
  • 49. Tests fail every now and then ... … because the tested UI is changed
  • 50. Tests fail every now and then ... Ah! And also because errors are made ...
  • 52. T s continuends Time spent on What to do %% of time Allocating failures Use test harness 1% - 5% Anderstandint the failure reason Use test logging, save images, save UI state 10% - 80% Fix the tests Move common code to the library ( * ) 90% - 10% (*) The only way it is different from programming is that there are a lot of tests. More on this later.
  • 54. Understanding failure Logging UI operations Going to push ... button Selecting ... menu UI responces Found list view: … UI hierarchy Scene «…» Group «…» Button «…» UI states Images
  • 55. Demo Jemmy logging functionality
  • 56. Fix the tests One UI, many-many tests. Do as few test code changes as possible Ideally … one change in test code for one change in UI code.
  • 57.
  • 60. Remember the formula? T D + * T S N R T M * N R N C * E A = N C * E A – automation effectiveness To be used for every particular product. N R and N C are unique for a product. T M is a characteristic of a test suite. Smaller T D and T S - higher the E A . Coefficient depend on the way you write your tests
  • 61. T S mainly consists of time for test modification. When product changes, tests need to be changed accordingly. Many tests! Hundreds. “ Less changes of test code per a change in the product UI.” Ideally ... no more than one. But ... how? You are the coders – you know: Move code to test library.
  • 62. Application domain model That's ... car catalog of some sort
  • 64.
  • 66. sleep(5) //sleeps to let dialog be painted
  • 69. click(235,212) //hit OK T d ~= 1.1 * T m , T s ~= 1 * T m Never tried, but ...
  • 70.
  • 75. Select “Gray” color in combo box
  • 77. Widgets or coordinates T D ~= 3 * T M , T S ~= .5 * T M
  • 78.
  • 79. T D ~= 5 * T M , T S ~= .2 * T M
  • 80.
  • 81. T D ~= 7.5 * T M , T S ~= .05 * T M
  • 82. T d and T s together
  • 83. T D and T S for N C =3, N R =8, T M =1
  • 84. E A for N C =3, N R =8
  • 85. Testing JavaFX UI Tips from JavaFX quality team Alexandre (Shura) Iline Java and JavaFX quality architect Oracle
  • 86.

Editor's Notes

  1. Note that in reality all the verifications should be done throwg waiting
  2. Effectiveness is estimated under assumtion that the testing is thoruogh and there are many tests
  3. This is a well accepeted 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.
  4. This is a well accepeted 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.
  5. If we get to it, I will be howing figures which explain why do we think so
  6. It is not a toy
  7. ditto
  8. The values of course depend on how the fast product is changing The estimations are for NetBeans – we went throughthis stage Now would happen if the combobox is replaced by color chooser page up test would fail, 'cause it's looking for combobox page down Most importantly ... all tests would fail!
  9. Obvious solution