SlideShare uma empresa Scribd logo
1 de 58
Testing JavaFX UI Tips from JavaFX quality team Alexandre (Shura) Iline Java and JavaFX quality architect Oracle
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.
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 Analyze  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  maintenance 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  experiment Extended to support JavaFX (2009) Open-source  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
Lookup demo
Interfaces Interface Control types Description Mouse, Keyboard, Drag Anything Low level input Parent Containers, list (for its content) Something you could look within Selectable Toggle button, radio button,  combo box , 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 Text 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  components Time spent on What to do %% of time Allocating failures Use test harness 1% - 5% Understanding  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  responses 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.
Decrease maintenance cost ,[object Object],openFile(String filename) ,[object Object],lookup(Button.class, new ByText<Button>( «Low» ))   ,[object Object],.wrap(0).mouse().click(); Thread.sleep(1000); ...
Demo Refining test.

Mais conteúdo relacionado

Mais procurados

Software Testing - Day One
Software Testing - Day OneSoftware Testing - Day One
Software Testing - Day OneGovardhan Reddy
 
Verification and Validation in Manual Testing
Verification and Validation in Manual TestingVerification and Validation in Manual Testing
Verification and Validation in Manual TestingBollapalli Vasundhara
 
Testing Presentation
Testing PresentationTesting Presentation
Testing Presentationsureshpkumar
 
Eclipse Con 2015: Codan - a C/C++ Code Analysis Framework for CDT
Eclipse Con 2015: Codan - a C/C++ Code Analysis Framework for CDTEclipse Con 2015: Codan - a C/C++ Code Analysis Framework for CDT
Eclipse Con 2015: Codan - a C/C++ Code Analysis Framework for CDTElena Laskavaia
 
Documenting Code - Patterns and Anti-patterns - NLPW 2016
Documenting Code - Patterns and Anti-patterns - NLPW 2016Documenting Code - Patterns and Anti-patterns - NLPW 2016
Documenting Code - Patterns and Anti-patterns - NLPW 2016Søren Lund
 
Pm training (planning and tracking) - Project Leader Ramp-Up
Pm training (planning and tracking) - Project Leader Ramp-Up Pm training (planning and tracking) - Project Leader Ramp-Up
Pm training (planning and tracking) - Project Leader Ramp-Up Mobi Marketing
 
Beyond Unit Testing
Beyond Unit TestingBeyond Unit Testing
Beyond Unit TestingSøren Lund
 
Documenting code yapceu2016
Documenting code yapceu2016Documenting code yapceu2016
Documenting code yapceu2016Søren Lund
 
How to Profit from Static Analysis
How to Profit from Static AnalysisHow to Profit from Static Analysis
How to Profit from Static AnalysisElena Laskavaia
 
Software Testing Tecniques
Software Testing TecniquesSoftware Testing Tecniques
Software Testing Tecniquesersanbilik
 
Case Studies in Terrible Testing
Case Studies in Terrible TestingCase Studies in Terrible Testing
Case Studies in Terrible TestingTodd Gardner
 
ASDSpec, Model Based Testing
ASDSpec, Model Based TestingASDSpec, Model Based Testing
ASDSpec, Model Based TestingRachid Kherrazi
 

Mais procurados (12)

Software Testing - Day One
Software Testing - Day OneSoftware Testing - Day One
Software Testing - Day One
 
Verification and Validation in Manual Testing
Verification and Validation in Manual TestingVerification and Validation in Manual Testing
Verification and Validation in Manual Testing
 
Testing Presentation
Testing PresentationTesting Presentation
Testing Presentation
 
Eclipse Con 2015: Codan - a C/C++ Code Analysis Framework for CDT
Eclipse Con 2015: Codan - a C/C++ Code Analysis Framework for CDTEclipse Con 2015: Codan - a C/C++ Code Analysis Framework for CDT
Eclipse Con 2015: Codan - a C/C++ Code Analysis Framework for CDT
 
Documenting Code - Patterns and Anti-patterns - NLPW 2016
Documenting Code - Patterns and Anti-patterns - NLPW 2016Documenting Code - Patterns and Anti-patterns - NLPW 2016
Documenting Code - Patterns and Anti-patterns - NLPW 2016
 
Pm training (planning and tracking) - Project Leader Ramp-Up
Pm training (planning and tracking) - Project Leader Ramp-Up Pm training (planning and tracking) - Project Leader Ramp-Up
Pm training (planning and tracking) - Project Leader Ramp-Up
 
Beyond Unit Testing
Beyond Unit TestingBeyond Unit Testing
Beyond Unit Testing
 
Documenting code yapceu2016
Documenting code yapceu2016Documenting code yapceu2016
Documenting code yapceu2016
 
How to Profit from Static Analysis
How to Profit from Static AnalysisHow to Profit from Static Analysis
How to Profit from Static Analysis
 
Software Testing Tecniques
Software Testing TecniquesSoftware Testing Tecniques
Software Testing Tecniques
 
Case Studies in Terrible Testing
Case Studies in Terrible TestingCase Studies in Terrible Testing
Case Studies in Terrible Testing
 
ASDSpec, Model Based Testing
ASDSpec, Model Based TestingASDSpec, Model Based Testing
ASDSpec, Model Based Testing
 

Destaque

анатомия интернет банка Publish
анатомия интернет банка Publishанатомия интернет банка Publish
анатомия интернет банка Publishrit2010
 
Ilia kantor паттерны серверных comet решений
Ilia kantor паттерны серверных comet решенийIlia kantor паттерны серверных comet решений
Ilia kantor паттерны серверных comet решенийrit2010
 
анатомия интернет банка Publish
анатомия интернет банка Publishанатомия интернет банка Publish
анатомия интернет банка Publishrit2010
 
Alexei shilov 2010 rit-rakudo
Alexei shilov 2010 rit-rakudoAlexei shilov 2010 rit-rakudo
Alexei shilov 2010 rit-rakudorit2010
 
Anatol filin pragmatic documentation 1_r
Anatol filin  pragmatic documentation 1_rAnatol filin  pragmatic documentation 1_r
Anatol filin pragmatic documentation 1_rrit2010
 
Sphinx new
Sphinx newSphinx new
Sphinx newrit2010
 
Microsoft cluster systems ritconf
Microsoft cluster systems ritconfMicrosoft cluster systems ritconf
Microsoft cluster systems ritconfrit2010
 
евгения б фирсова смена Web платформы на лету
евгения б  фирсова смена Web платформы  на летуевгения б  фирсова смена Web платформы  на лету
евгения б фирсова смена Web платформы на летуrit2010
 
анатолий шарифулин Mojolicious финальная версия
анатолий шарифулин Mojolicious   финальная версияанатолий шарифулин Mojolicious   финальная версия
анатолий шарифулин Mojolicious финальная версияrit2010
 
Moose talk at FOSDEM 2011 (Perl devroom)
Moose talk at FOSDEM 2011 (Perl devroom)Moose talk at FOSDEM 2011 (Perl devroom)
Moose talk at FOSDEM 2011 (Perl devroom)xSawyer
 

Destaque (10)

анатомия интернет банка Publish
анатомия интернет банка Publishанатомия интернет банка Publish
анатомия интернет банка Publish
 
Ilia kantor паттерны серверных comet решений
Ilia kantor паттерны серверных comet решенийIlia kantor паттерны серверных comet решений
Ilia kantor паттерны серверных comet решений
 
анатомия интернет банка Publish
анатомия интернет банка Publishанатомия интернет банка Publish
анатомия интернет банка Publish
 
Alexei shilov 2010 rit-rakudo
Alexei shilov 2010 rit-rakudoAlexei shilov 2010 rit-rakudo
Alexei shilov 2010 rit-rakudo
 
Anatol filin pragmatic documentation 1_r
Anatol filin  pragmatic documentation 1_rAnatol filin  pragmatic documentation 1_r
Anatol filin pragmatic documentation 1_r
 
Sphinx new
Sphinx newSphinx new
Sphinx new
 
Microsoft cluster systems ritconf
Microsoft cluster systems ritconfMicrosoft cluster systems ritconf
Microsoft cluster systems ritconf
 
евгения б фирсова смена Web платформы на лету
евгения б  фирсова смена Web платформы  на летуевгения б  фирсова смена Web платформы  на лету
евгения б фирсова смена Web платформы на лету
 
анатолий шарифулин Mojolicious финальная версия
анатолий шарифулин Mojolicious   финальная версияанатолий шарифулин Mojolicious   финальная версия
анатолий шарифулин Mojolicious финальная версия
 
Moose talk at FOSDEM 2011 (Perl devroom)
Moose talk at FOSDEM 2011 (Perl devroom)Moose talk at FOSDEM 2011 (Perl devroom)
Moose talk at FOSDEM 2011 (Perl devroom)
 

Semelhante a 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 Fxuirit2010
 
Alexandre Iline Rit 2010 Java Fxui
Alexandre Iline Rit 2010 Java FxuiAlexandre Iline Rit 2010 Java Fxui
Alexandre Iline Rit 2010 Java Fxuiguest092df8
 
Pragmatic Parallels: Java and JavaScript
Pragmatic Parallels: Java and JavaScriptPragmatic Parallels: Java and JavaScript
Pragmatic Parallels: Java and JavaScriptdavejohnson
 
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
 
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
 
Eclipse Summit Europe '10 - Test UI Aspects of Plug-ins
Eclipse Summit Europe '10 - Test UI Aspects of Plug-insEclipse Summit Europe '10 - Test UI Aspects of Plug-ins
Eclipse Summit Europe '10 - Test UI Aspects of Plug-insTonny Madsen
 
Automating JFC UI application testing with Jemmy
Automating JFC UI application testing with JemmyAutomating JFC UI application testing with Jemmy
Automating JFC UI application testing with JemmySPB SQA Group
 
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 TestSeb 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
 
Getting started with test complete 7
Getting started with test complete 7Getting started with test complete 7
Getting started with test complete 7Hoamuoigio Hoa
 
Unit Tests And Automated Testing
Unit Tests And Automated TestingUnit Tests And Automated Testing
Unit Tests And Automated TestingLee Englestone
 
Plug-in Architectures
Plug-in ArchitecturesPlug-in Architectures
Plug-in Architectureselliando dias
 
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
 
Finance & Testing 2009 Highspeed Testautomation
Finance & Testing 2009 Highspeed TestautomationFinance & Testing 2009 Highspeed Testautomation
Finance & Testing 2009 Highspeed Testautomationguesta64aefc
 
FT 2009 Highspeed Test Automation
FT 2009 Highspeed Test AutomationFT 2009 Highspeed Test Automation
FT 2009 Highspeed Test AutomationMichel Löhr
 

Semelhante a Alexandre.iline rit 2010 java_fxui_extra (20)

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
 
Pragmatic Parallels: Java and JavaScript
Pragmatic Parallels: Java and JavaScriptPragmatic Parallels: Java and JavaScript
Pragmatic Parallels: Java and JavaScript
 
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
 
Xam expertday
Xam expertdayXam expertday
Xam expertday
 
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)
 
Eclipse Summit Europe '10 - Test UI Aspects of Plug-ins
Eclipse Summit Europe '10 - Test UI Aspects of Plug-insEclipse Summit Europe '10 - Test UI Aspects of Plug-ins
Eclipse Summit Europe '10 - Test UI Aspects of Plug-ins
 
Automating JFC UI application testing with Jemmy
Automating JFC UI application testing with JemmyAutomating JFC UI application testing with Jemmy
Automating JFC UI application testing with Jemmy
 
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
 
Test Complete
Test CompleteTest Complete
Test Complete
 
Tdd is not about testing (OOP)
Tdd is not about testing (OOP)Tdd is not about testing (OOP)
Tdd is not about testing (OOP)
 
Getting started with test complete 7
Getting started with test complete 7Getting started with test complete 7
Getting started with test complete 7
 
Modern Python Testing
Modern Python TestingModern Python Testing
Modern Python Testing
 
Unit Tests And Automated Testing
Unit Tests And Automated TestingUnit Tests And Automated Testing
Unit Tests And Automated Testing
 
Coded ui test
Coded ui testCoded ui test
Coded ui test
 
Plug-in Architectures
Plug-in ArchitecturesPlug-in Architectures
Plug-in Architectures
 
UI Testing
UI TestingUI Testing
UI Testing
 
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...
 
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
 

Mais de 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
 
Max Lapshin Erlyvideo V2
Max Lapshin Erlyvideo V2Max Lapshin Erlyvideo V2
Max Lapshin Erlyvideo V2rit2010
 
Eugene Lisitsky Web Sockets
Eugene Lisitsky Web SocketsEugene Lisitsky Web Sockets
Eugene Lisitsky Web Socketsrit2010
 
Alexey Bazhin Balancing
Alexey Bazhin BalancingAlexey Bazhin Balancing
Alexey Bazhin Balancingrit2010
 
рит, нефункциональная структура команды, безуглый
рит, нефункциональная структура команды, безуглыйрит, нефункциональная структура команды, безуглый
рит, нефункциональная структура команды, безуглыйrit2010
 
левин михаил выступление на рит большие картинки
левин михаил выступление на рит   большие картинкилевин михаил выступление на рит   большие картинки
левин михаил выступление на рит большие картинкиrit2010
 
левин михаил выступление на рит
левин михаил выступление на ритлевин михаил выступление на рит
левин михаил выступление на ритrit2010
 
антон веснин Rails Application Servers
антон веснин Rails Application Serversантон веснин Rails Application Servers
антон веснин Rails Application Serversrit2010
 

Mais de rit2010 (20)

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
 
Max Lapshin Erlyvideo V2
Max Lapshin Erlyvideo V2Max Lapshin Erlyvideo V2
Max Lapshin Erlyvideo V2
 
Eugene Lisitsky Web Sockets
Eugene Lisitsky Web SocketsEugene Lisitsky Web Sockets
Eugene Lisitsky Web Sockets
 
Alexey Bazhin Balancing
Alexey Bazhin BalancingAlexey Bazhin Balancing
Alexey Bazhin Balancing
 
рит, нефункциональная структура команды, безуглый
рит, нефункциональная структура команды, безуглыйрит, нефункциональная структура команды, безуглый
рит, нефункциональная структура команды, безуглый
 
левин михаил выступление на рит большие картинки
левин михаил выступление на рит   большие картинкилевин михаил выступление на рит   большие картинки
левин михаил выступление на рит большие картинки
 
левин михаил выступление на рит
левин михаил выступление на ритлевин михаил выступление на рит
левин михаил выступление на рит
 
антон веснин Rails Application Servers
антон веснин Rails Application Serversантон веснин Rails Application Servers
антон веснин Rails Application Servers
 

Alexandre.iline rit 2010 java_fxui_extra

  • 1. Testing JavaFX UI Tips from JavaFX quality team Alexandre (Shura) Iline Java and JavaFX quality architect Oracle
  • 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.
  • 7. Test library design approaches
  • 8. 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.»
  • 9. UI testing … most often ... «Checking whether usage of a product UI leads to results expected by the the person who performs testing »
  • 10.
  • 12. Verify file chooser directory
  • 17. ....
  • 18. UI Testing Manual Automated Initial step Design test specification. Create tests. Establish regular runs. Ongoing Click, click, click Analyze 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
  • 19. Continuous build No Yes. Development Success
  • 20. Continuous build with testing No No Yes Yes. = Compilation successful Success Passed
  • 21. 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 maintenance 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
  • 22. Jemmy
  • 23. 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 experiment Extended to support JavaFX (2009) Open-source with support of JavaFX 1.2 (2009) Developed in close-source for 1.3 since then
  • 24.
  • 25.
  • 26.
  • 28. 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
  • 29. 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
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35. Button with text «browse»
  • 36. UI could be very complicated
  • 37. UI could be very complicated
  • 39. Interfaces Interface Control types Description Mouse, Keyboard, Drag Anything Low level input Parent Containers, list (for its content) Something you could look within Selectable Toggle button, radio button, combo box , 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 Text 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 components Time spent on What to do %% of time Allocating failures Use test harness 1% - 5% Understanding 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 responses 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.
  • 59.
  • 63. 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
  • 64. 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.
  • 65. Application domain model That's ... car catalog of some sort
  • 67.
  • 69. sleep(5) //sleeps to let dialog be painted
  • 72. click(235,212) //hit OK T d ~= 1.1 * T m , T s ~= 1 * T m Never tried, but ...
  • 73.
  • 78. Select “Gray” color in combo box
  • 80. Widgets or coordinates T D ~= 3 * T M , T S ~= .5 * T M
  • 81.
  • 82. T D ~= 5 * T M , T S ~= .2 * T M
  • 83.
  • 84. T D ~= 7.5 * T M , T S ~= .05 * T M
  • 85. T d and T s together
  • 86. T D and T S for N C =3, N R =8, T M =1
  • 87. E A for N C =3, N R =8
  • 88. Testing JavaFX UI Tips from JavaFX quality team Alexandre (Shura) Iline Java and JavaFX quality architect Oracle

Notas do Editor

  1. Note that in reality all the verifications should be done throwg waiting
  2. Effectiveness is estimated under assumption that the testing is thorough and there are many tests
  3. 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.
  4. 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.
  5. If we get to it, I will be showing 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 through this stage Now would happen if the combo-box is replaced by color chooser page up test would fail, &apos;cause it&apos;s looking for combo-box page down Most importantly ... all tests would fail!
  9. Obvious solution