SlideShare a Scribd company logo
1 of 53
Download to read offline
1
<Insert Picture Here>
UI test automation techniques by an example of JavaFX UI.
Alexandre (Shura) Iline
Java 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.
4
The presented technology tested on
JavaFX Authoring Tool
5
<Insert Picture Here>
Agenda
• UI libraries features
(from testing perspective)
• UI Sample
• Jemmy tool
• Writing tests
• Reduce test cost support
• Remote testing
<Insert Picture Here>
UI features
7
UI libraries features
Looking from test side
• Hierarchy
• Controls
• Transformations
• Images
• Animation
• Event queue
8
Control hierarchy
http://java.sun.com/javafx/1.3/docs/api/
Stage
Scene
ParentControl
Node
9
Controls
Button
ToggleButton
RadioButton
CheckBox
Slider
ScrollBar
TextBox
ListView
ComboBox
Custom controls
http://java.sun.com/javafx/1.3/docs/api/
10
Transformations
http://java.sun.com/javafx/1.3/docs/api/
Affine
Rotate
Scale
Shear
Translate
11
Images
12
Animation
http://java.sun.com/javafx/1.3/docs/api/
Timeline
Interpolator
KeyFrame
PathTransition
RotateTransition
ScaleTransition
TranslateTransition
13
User
UI
Other
threads
Event queue
14
Tested UI
A Bézier curve is a
parametric curve
frequently used in
computer graphics and
related fields.
<Insert Picture Here>
Jemmy tool
16
Find Do VerifyPass Pass
Pass
Fail Fail Fail
Failure analysis
Find next control
To perform operation
Verify that expected
State reached
Perform necessary
actions
UI test workflow
17
JemmyCore
JemmySGJemmy v2
AWT & Swing
JemmyRemote
JemmyFXRemoteJemmyFX
JemmySWT
JRMC
JavaFX Authoring
Tool
JavaFX
LCDUI
NetBeans
JDK
Jemmy and extensions
Jemmy v3
JemmyAWT
18
Hierarchy Criteria
Text
Scroller
Selectable
Mouse
Keyboard
Interfaces
Lookup
Properties
Images
Factory
Comparator
Interfaces API
JemmyCore
AWTRobot
AWT Robot
Text
Scroller
Selectable
Custom
Coords
Thumb Scroller
PropertiesAPIImagesAPI
InputAPILookupAPI
19
Scenes,
nodes
Hierarchy Criteria
AWT Robot
Text
AWT Robot
Scroller
Selectable
Mouse
Keyboard
Custom
Interfaces
Lookup
Coords
Text
ID
Properties
Images
AWTRobot
Factory
Comparator
FXRobot
Thum
b
Scroller
Interfaces API
JemmyFX
FXRobot
PropertiesAPIImagesAPI
InputAPIOperatorsAPILookupAPI
<Insert Picture Here>
Let's test
21
One line test
22
• Type
• Property
– text
– value
– ID
– tooltip
• Image
• Coordinated
• Index (last resort)
• Any criteria which could be written in java code
Lookup principles
Test should be able to find control by ...
23
Lookup code
24
More lookup code
25
Control interfaces
Control type Properties
Node Mouse, Keyboard
Control Focusable
ToggleButton Selectable
Text SelectionText
ScrollBar, Slider Scroll
ListView Scroll, Parent<? extends Object>
Scene, Group Parent<Node>
26
Control interfaces usage code
27
JemmyFX Browser
28
UI test
• Customize ...
– Curve attributes
– View attributes
• Verify image
• Generate code
• Verify code
• Start animation
• Verify animation
29
Test
30
Waitings
Every UI action takes time
• Wait for everything
– Window appearance
– Label change
– Image appearance
– Property change
– File update
• Configurable timeouts
• Exceptions
31
Waiting code
32
User
UI
Other
threads
Event queue
33
UI
Other
threads
Event queue with a test
Test
Actions
Verifications
Lookup
34
Pull data through queue
35
Properties
Control type Properties
Node ID bounds
Control get$tooltip get$cursor
ToggleButton get$pressed
Text text get$strikethrough get$underline
Slider, ScrollBar vertical minimum maximum value
CheckBox state is.tri.state
TextInputControl selection.anchor position text
get$columns get$editable
36
Properties code
37
Images
- =
Expected Actual Diff
38
Images code
39
Animation code
40
Verifying generated code
41
TD + *TS NR
TM * NR
NC*
EA =
NC
*
TM
– time needed to run the tests manually
TD
– time needed for automated test development
TS
– time needed for automated test support
NR
– number of test runs
NC
– number of tested configurations
Test automation effectiveness
42
What about record&replay?
• Pretty low TD
– Pretty much the same as TM
… but ...
• High TS
– Generates unmaintainable code
– No test code encapsulation
43
Ideal test
• Lives forever
• Written in terms of domain model
• All the UI logic is hidden within a library
<Insert Picture Here>
Remote testing
45
Hierarchy Criteria
Text
Scroller
Selectable
Mouse
Keyboard
Interfaces
Lookup
By
properties
Properties
Images
Factory
Comparator
JemmyRemote
Desktop Device
Properties
Socket
Hierarchy
46
JemmyRemote
• Benefits
– Low load on tested UI
– Ability to run on low-end devices
• Limitations
– Two-part code
– Lookup is only through properties
– Slow
47
AWTRobot
AWTRobot
Hierarchy Criteria
Text
Scroller
Selectable
Mouse
Keyboard
Interfaces
Lookup
By
properties
Properties
Images
Factory
Comparator
JemmyFXRemote
Desktop Device
Properties
Socket
FXRobot
Scenes,
nodes
48
JemmyFXRemote sample
49
http://jemmy.dev.java.net
References
alexandre.iline@oracle.com
alexander.kouznetsov@oracle.com
https://jemmy.dev.java.net/AutomationEffectiveness.html
https://jemmy.dev.java.net/RecordingVSCoding.html
users@dev.java.net
<Insert Picture Here>
UI test automation techniques by an example of JavaFX UI.
Alexandre (Shura) Iline
Java quality architect
51
Backup slides
52
Operators API
<Control type name>Operator.find(SceneOperator, <lookup data>)
53
JemmyFXScript

More Related Content

Similar to Александр Ильин, Oracle, - Технология автоматизации тестирования пользовательского интерфейса на примере JavaFX

Advanced Coded UI Testing
Advanced Coded UI TestingAdvanced Coded UI Testing
Advanced Coded UI TestingShai Raiten
 
Protractor Tutorial Quality in Agile 2015
Protractor Tutorial Quality in Agile 2015Protractor Tutorial Quality in Agile 2015
Protractor Tutorial Quality in Agile 2015Andrew Eisenberg
 
DSL, Page Object and WebDriver – the path to reliable functional tests.pptx
DSL, Page Object and WebDriver – the path to reliable functional tests.pptxDSL, Page Object and WebDriver – the path to reliable functional tests.pptx
DSL, Page Object and WebDriver – the path to reliable functional tests.pptxMikalai Alimenkou
 
DSL, Page Object и WebDriver – путь к надежным функциональным тестам
DSL, Page Object и WebDriver – путь к надежным функциональным тестамDSL, Page Object и WebDriver – путь к надежным функциональным тестам
DSL, Page Object и WebDriver – путь к надежным функциональным тестамSQALab
 
2 rft simplified_scripting_shinoj_z
2 rft simplified_scripting_shinoj_z2 rft simplified_scripting_shinoj_z
2 rft simplified_scripting_shinoj_zIBM
 
RFT Simplified Scripting- Shinoj Z
RFT Simplified Scripting- Shinoj ZRFT Simplified Scripting- Shinoj Z
RFT Simplified Scripting- Shinoj ZRoopa Nadkarni
 
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan Kušt
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan KuštInfinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan Kušt
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan KuštInfinum
 
Episode 20 - Trigger Frameworks in Salesforce
Episode 20 - Trigger Frameworks in SalesforceEpisode 20 - Trigger Frameworks in Salesforce
Episode 20 - Trigger Frameworks in SalesforceJitendra Zaa
 
Постоянное тестирование интеграции
Постоянное тестирование интеграцииПостоянное тестирование интеграции
Постоянное тестирование интеграцииSQALab
 
Functional Testing
Functional TestingFunctional Testing
Functional TestingAdam Hill
 
Iasi code camp 20 april 2013 marian chicu - database unit tests in the sql se...
Iasi code camp 20 april 2013 marian chicu - database unit tests in the sql se...Iasi code camp 20 april 2013 marian chicu - database unit tests in the sql se...
Iasi code camp 20 april 2013 marian chicu - database unit tests in the sql se...Codecamp Romania
 
Escaping Test Hell - ACCU 2014
Escaping Test Hell - ACCU 2014Escaping Test Hell - ACCU 2014
Escaping Test Hell - ACCU 2014Wojciech Seliga
 
Blazor Stability Testing Tools for Bullet Proof Applications
Blazor Stability Testing Tools for Bullet Proof ApplicationsBlazor Stability Testing Tools for Bullet Proof Applications
Blazor Stability Testing Tools for Bullet Proof ApplicationsEd Charbeneau
 
Cross Platform Appium Tests: How To
Cross Platform Appium Tests: How ToCross Platform Appium Tests: How To
Cross Platform Appium Tests: How ToGlobalLogic Ukraine
 
Angular Application Testing
Angular Application TestingAngular Application Testing
Angular Application TestingTroy Miles
 
Implementing Test Automation in Agile Projects
Implementing Test Automation in Agile ProjectsImplementing Test Automation in Agile Projects
Implementing Test Automation in Agile ProjectsDominik Dary
 
Mobile developer is Software developer
Mobile developer is Software developerMobile developer is Software developer
Mobile developer is Software developerEugen Martynov
 
Yaron Inger - Enlight - Inside the app of the year
 Yaron Inger - Enlight - Inside the app of the year  Yaron Inger - Enlight - Inside the app of the year
Yaron Inger - Enlight - Inside the app of the year tlv-ios-dev
 

Similar to Александр Ильин, Oracle, - Технология автоматизации тестирования пользовательского интерфейса на примере JavaFX (20)

Advanced Coded UI Testing
Advanced Coded UI TestingAdvanced Coded UI Testing
Advanced Coded UI Testing
 
Protractor Tutorial Quality in Agile 2015
Protractor Tutorial Quality in Agile 2015Protractor Tutorial Quality in Agile 2015
Protractor Tutorial Quality in Agile 2015
 
DSL, Page Object and WebDriver – the path to reliable functional tests.pptx
DSL, Page Object and WebDriver – the path to reliable functional tests.pptxDSL, Page Object and WebDriver – the path to reliable functional tests.pptx
DSL, Page Object and WebDriver – the path to reliable functional tests.pptx
 
DSL, Page Object и WebDriver – путь к надежным функциональным тестам
DSL, Page Object и WebDriver – путь к надежным функциональным тестамDSL, Page Object и WebDriver – путь к надежным функциональным тестам
DSL, Page Object и WebDriver – путь к надежным функциональным тестам
 
2 rft simplified_scripting_shinoj_z
2 rft simplified_scripting_shinoj_z2 rft simplified_scripting_shinoj_z
2 rft simplified_scripting_shinoj_z
 
RFT Simplified Scripting- Shinoj Z
RFT Simplified Scripting- Shinoj ZRFT Simplified Scripting- Shinoj Z
RFT Simplified Scripting- Shinoj Z
 
TestCafe Meetup Malmberg
TestCafe Meetup MalmbergTestCafe Meetup Malmberg
TestCafe Meetup Malmberg
 
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan Kušt
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan KuštInfinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan Kušt
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan Kušt
 
Episode 20 - Trigger Frameworks in Salesforce
Episode 20 - Trigger Frameworks in SalesforceEpisode 20 - Trigger Frameworks in Salesforce
Episode 20 - Trigger Frameworks in Salesforce
 
Постоянное тестирование интеграции
Постоянное тестирование интеграцииПостоянное тестирование интеграции
Постоянное тестирование интеграции
 
Functional Testing
Functional TestingFunctional Testing
Functional Testing
 
Iasi code camp 20 april 2013 marian chicu - database unit tests in the sql se...
Iasi code camp 20 april 2013 marian chicu - database unit tests in the sql se...Iasi code camp 20 april 2013 marian chicu - database unit tests in the sql se...
Iasi code camp 20 april 2013 marian chicu - database unit tests in the sql se...
 
Escaping Test Hell - ACCU 2014
Escaping Test Hell - ACCU 2014Escaping Test Hell - ACCU 2014
Escaping Test Hell - ACCU 2014
 
WOdka
WOdkaWOdka
WOdka
 
Blazor Stability Testing Tools for Bullet Proof Applications
Blazor Stability Testing Tools for Bullet Proof ApplicationsBlazor Stability Testing Tools for Bullet Proof Applications
Blazor Stability Testing Tools for Bullet Proof Applications
 
Cross Platform Appium Tests: How To
Cross Platform Appium Tests: How ToCross Platform Appium Tests: How To
Cross Platform Appium Tests: How To
 
Angular Application Testing
Angular Application TestingAngular Application Testing
Angular Application Testing
 
Implementing Test Automation in Agile Projects
Implementing Test Automation in Agile ProjectsImplementing Test Automation in Agile Projects
Implementing Test Automation in Agile Projects
 
Mobile developer is Software developer
Mobile developer is Software developerMobile developer is Software developer
Mobile developer is Software developer
 
Yaron Inger - Enlight - Inside the app of the year
 Yaron Inger - Enlight - Inside the app of the year  Yaron Inger - Enlight - Inside the app of the year
Yaron Inger - Enlight - Inside the app of the year
 

More from Media Gorod

Iidf market watch_2013
Iidf market watch_2013Iidf market watch_2013
Iidf market watch_2013Media Gorod
 
E travel 2013 ufs-f
E travel 2013 ufs-fE travel 2013 ufs-f
E travel 2013 ufs-fMedia Gorod
 
Travel shop 2013
Travel shop 2013Travel shop 2013
Travel shop 2013Media Gorod
 
Kozyakov pay u_e-travel2013
Kozyakov pay u_e-travel2013Kozyakov pay u_e-travel2013
Kozyakov pay u_e-travel2013Media Gorod
 
13909772985295c7a772abc7.11863824
13909772985295c7a772abc7.1186382413909772985295c7a772abc7.11863824
13909772985295c7a772abc7.11863824Media Gorod
 
As e-travel 2013
As   e-travel 2013As   e-travel 2013
As e-travel 2013Media Gorod
 
Ishounkina internet research-projects
Ishounkina internet research-projectsIshounkina internet research-projects
Ishounkina internet research-projectsMedia Gorod
 
Orlova pay u group_290813_
Orlova pay u group_290813_Orlova pay u group_290813_
Orlova pay u group_290813_Media Gorod
 
Ep presentation (infographic 2013)
Ep presentation (infographic 2013)Ep presentation (infographic 2013)
Ep presentation (infographic 2013)Media Gorod
 
Iway slides e-travel_2013-11_ready
Iway slides e-travel_2013-11_readyIway slides e-travel_2013-11_ready
Iway slides e-travel_2013-11_readyMedia Gorod
 
Data insight e-travel2013
Data insight e-travel2013Data insight e-travel2013
Data insight e-travel2013Media Gorod
 
Электронное Правительство как Продукт
Электронное Правительство как ПродуктЭлектронное Правительство как Продукт
Электронное Правительство как ПродуктMedia Gorod
 
Lean мышление / Специфика Lean Startup
Lean мышление / Специфика Lean StartupLean мышление / Специфика Lean Startup
Lean мышление / Специфика Lean StartupMedia Gorod
 
Глобальный взгляд на мобильный мир (Nielsen)
 Глобальный взгляд на мобильный мир (Nielsen) Глобальный взгляд на мобильный мир (Nielsen)
Глобальный взгляд на мобильный мир (Nielsen)Media Gorod
 
Как россияне используют смартфоны (Nielsen)
 Как россияне используют смартфоны (Nielsen) Как россияне используют смартфоны (Nielsen)
Как россияне используют смартфоны (Nielsen)Media Gorod
 
Мобильный интернет в России (MailRuGroup)
Мобильный интернет в России (MailRuGroup) Мобильный интернет в России (MailRuGroup)
Мобильный интернет в России (MailRuGroup) Media Gorod
 

More from Media Gorod (20)

Itogi2013
Itogi2013Itogi2013
Itogi2013
 
Moneytree rus 1
Moneytree rus 1Moneytree rus 1
Moneytree rus 1
 
Iidf market watch_2013
Iidf market watch_2013Iidf market watch_2013
Iidf market watch_2013
 
E travel 2013 ufs-f
E travel 2013 ufs-fE travel 2013 ufs-f
E travel 2013 ufs-f
 
Travel shop 2013
Travel shop 2013Travel shop 2013
Travel shop 2013
 
Kozyakov pay u_e-travel2013
Kozyakov pay u_e-travel2013Kozyakov pay u_e-travel2013
Kozyakov pay u_e-travel2013
 
13909772985295c7a772abc7.11863824
13909772985295c7a772abc7.1186382413909772985295c7a772abc7.11863824
13909772985295c7a772abc7.11863824
 
As e-travel 2013
As   e-travel 2013As   e-travel 2013
As e-travel 2013
 
Ishounkina internet research-projects
Ishounkina internet research-projectsIshounkina internet research-projects
Ishounkina internet research-projects
 
E travel13
E travel13E travel13
E travel13
 
Orlova pay u group_290813_
Orlova pay u group_290813_Orlova pay u group_290813_
Orlova pay u group_290813_
 
Ep presentation (infographic 2013)
Ep presentation (infographic 2013)Ep presentation (infographic 2013)
Ep presentation (infographic 2013)
 
Iway slides e-travel_2013-11_ready
Iway slides e-travel_2013-11_readyIway slides e-travel_2013-11_ready
Iway slides e-travel_2013-11_ready
 
Data insight e-travel2013
Data insight e-travel2013Data insight e-travel2013
Data insight e-travel2013
 
Электронное Правительство как Продукт
Электронное Правительство как ПродуктЭлектронное Правительство как Продукт
Электронное Правительство как Продукт
 
Lean мышление / Специфика Lean Startup
Lean мышление / Специфика Lean StartupLean мышление / Специфика Lean Startup
Lean мышление / Специфика Lean Startup
 
Глобальный взгляд на мобильный мир (Nielsen)
 Глобальный взгляд на мобильный мир (Nielsen) Глобальный взгляд на мобильный мир (Nielsen)
Глобальный взгляд на мобильный мир (Nielsen)
 
Как россияне используют смартфоны (Nielsen)
 Как россияне используют смартфоны (Nielsen) Как россияне используют смартфоны (Nielsen)
Как россияне используют смартфоны (Nielsen)
 
Мобильный интернет в России (MailRuGroup)
Мобильный интернет в России (MailRuGroup) Мобильный интернет в России (MailRuGroup)
Мобильный интернет в России (MailRuGroup)
 
Meta Mass Media
Meta Mass MediaMeta Mass Media
Meta Mass Media
 

Александр Ильин, Oracle, - Технология автоматизации тестирования пользовательского интерфейса на примере JavaFX