SlideShare une entreprise Scribd logo
1  sur  36
Télécharger pour lire hors ligne
Automated User Tests
with Apache Flex
Gert Poppe
@gert789
About me
A Belgian consultant working at
Stack & Heap.
A passionate RIA developer.
A ZEND certified PHP Engineer.
A huge fan of the Randori Framework.
What are we talking about?
Wikipedia says:
... test automation is the use of special
software (separate from the software being
tested) to control the execution of tests and the
comparison of actual outcomes to predicted
outcomes. Test automation can automate some
repetitive but necessary tasks in a formalized
testing process already in place, or add
additional testing that would be difficult to
perform manually ...
Why should you bother?
● Efficiency
● More complete error reports
● Huge time savings
● A more complete code coverage
Why did we bother?
While taking over an existing project
● Huge and complicated code base
● No existing unit tests
● Complaints by users:
○ a lot of bugs in the GUI
○ a lot of recurrent bugs
How did we start?
External testing tool
Selenium
A suite of tools to automate your web
browser.
External Interface
communication between your browser
and the Flash Player.
● Java Test
○ Selenium for Java
○ Standalone Selenium server
○ FlexiumLink and FlashSelenium
● Flex Application
○ Flexium
https://github.com/StackAndHeap/flexium
The Selenium setup
DEMO
public Boolean click(String objectId) throws Exception {
delay();
if(isReady()) {
String result = call("doFlexClick", objectId, "");
return checkResult(result);
}
return false;
}
Under the hood - Selenium (1)
public Boolean click(String objectId) throws Exception {
delay();
if(isReady()) {
String result = call("doFlexClick", objectId, "");
return checkResult(result);
}
return false;
}
Under the hood - Selenium (1)
public Boolean click(String objectId) throws Exception {
delay();
if(isReady()) {
String result = call("doFlexClick", objectId, "");
return checkResult(result);
}
return false;
}
Under the hood - Selenium (1)
public Boolean click(String objectId) throws Exception {
delay();
if(isReady()) {
String result = call("doFlexClick", objectId, "");
return checkResult(result);
}
return false;
}
Under the hood - Selenium (1)
public Boolean click(String objectId) throws Exception {
delay();
if(isReady()) {
String result = call("doFlexClick", objectId, "");
return checkResult(result);
}
return false;
}
Under the hood - Selenium (1)
Under the hood - Selenium (2)
Under the hood - Selenium (3)
● Flexium
○ Compiles into your application
○ Parsing of your applications Stage
○ Registers your (custom) commands
Under the hood - Apache Flex (1)
Compiles into your application
... separate from the software being tested...
1) Use a Mixin
...
[Mixin]
public class Flexium extends Sprite {
...
Under the hood - Apache Flex (2)
Compiles into your application
... separate from the software being tested...
2) Include library
include-libraries library [...]
Under the hood - Apache Flex (2)
Parsing of your applications stage
Every component that gets added to the stage will be parsed by the
AS3-commons Stage Processing Library
http://as3commons.org/as3-commons-stageprocessing/index.html
Under the hood - Apache Flex (3)
Parsing of your applications stage with AS3Commons
private var _registry:FlashStageObjectProcessorRegistry;
private function initProcessor():void {
_registry = new FlashStageObjectProcessorRegistry();
_registry.useStageDestroyers = true;
_registry.registerStageObjectProcessor(
new EventDispatchingObjectProcessor(this),
new EventDispatchingObjectSelector()
);
_registry.initialize();
}
Under the hood - Apache Flex (4)
Parsing of your applications stage with AS3Commons
private var _registry:FlashStageObjectProcessorRegistry;
private function initProcessor():void {
_registry = new FlashStageObjectProcessorRegistry();
_registry.useStageDestroyers = true;
_registry.registerStageObjectProcessor(
new EventDispatchingObjectProcessor(this),
new EventDispatchingObjectSelector()
);
_registry.initialize();
}
Under the hood - Apache Flex (4)
Parsing of your applications stage with AS3Commons
private var _registry:FlashStageObjectProcessorRegistry;
private function initProcessor():void {
_registry = new FlashStageObjectProcessorRegistry();
_registry.useStageDestroyers = true;
_registry.registerStageObjectProcessor(
new EventDispatchingObjectProcessor(this),
new EventDispatchingObjectSelector()
);
_registry.initialize();
}
Under the hood - Apache Flex (4)
Parsing of your applications stage with AS3Commons
private var _registry:FlashStageObjectProcessorRegistry;
private function initProcessor():void {
_registry = new FlashStageObjectProcessorRegistry();
_registry.useStageDestroyers = true;
_registry.registerStageObjectProcessor(
new EventDispatchingObjectProcessor(this),
new EventDispatchingObjectSelector()
);
_registry.initialize();
}
Under the hood - Apache Flex (4)
Parsing of your applications stage with AS3Commons
public class EventDispatchingObjectSelector implements IObjectSelector {
public function approve(object:Object):Boolean {
return object is UIComponent;
}
}
Under the hood - Apache Flex (5)
Parsing of your applications stage with AS3Commons
public function process(displayObject:DisplayObject):DisplayObject {
_stageParser.addElement((displayObject as UIComponent).id, displayObject);
return displayObject;
}
public function destroy(displayObject:DisplayObject):DisplayObject {
_stageParser.removeElement((displayObject as UIComponent).id);
return displayObject;
}
Under the hood - Apache Flex (6)
Under the hood - Apache Flex (7)
Registers your (custom) commands
public class MouseAction extends AbstractAction implements IAction {
public function MouseAction(parser:StageParser) {
super(parser);
}
public function attachActions():void {
attach("click", doFlexClick);
}
public function doFlexClick(id:String, args:String):String {
var child:Object = parser.getElementById(id);
if (child == null) {
return Errors.OBJECT_NOT_FOUND;
}
return String(child.dispatchEvent(new MouseEvent(MouseEvent.CLICK)));
}
}
Under the hood - Apache Flex (7)
Registers your (custom) commands
public class MouseAction extends AbstractAction implements IAction {
public function MouseAction(parser:StageParser) {
super(parser);
}
public function attachActions():void {
attach("click", doFlexClick);
}
public function doFlexClick(id:String, args:String):String {
var child:Object = parser.getElementById(id);
if (child == null) {
return Errors.OBJECT_NOT_FOUND;
}
return String(child.dispatchEvent(new MouseEvent(MouseEvent.CLICK)));
}
}
Under the hood - Apache Flex (7)
Registers your (custom) commands
public class MouseAction extends AbstractAction implements IAction {
public function MouseAction(parser:StageParser) {
super(parser);
}
public function attachActions():void {
attach("click", doFlexClick);
}
public function doFlexClick(id:String, args:String):String {
var child:Object = parser.getElementById(id);
if (child == null) {
return Errors.OBJECT_NOT_FOUND;
}
return String(child.dispatchEvent(new MouseEvent(MouseEvent.CLICK)));
}
}
Under the hood - Apache Flex (7)
Registers your (custom) commands
public class MouseAction extends AbstractAction implements IAction {
public function MouseAction(parser:StageParser) {
super(parser);
}
public function attachActions():void {
attach("click", doFlexClick);
}
public function doFlexClick(id:String, args:String):String {
var child:Object = parser.getElementById(id);
if (child == null) {
return Errors.OBJECT_NOT_FOUND;
}
return String(child.dispatchEvent(new MouseEvent(MouseEvent.CLICK)));
}
}
Under the hood - Apache Flex (7)
Registers your (custom) commands
public class MouseAction extends AbstractAction implements IAction {
public function MouseAction(parser:StageParser) {
super(parser);
}
public function attachActions():void {
attach("click", doFlexClick);
}
public function doFlexClick(id:String, args:String):String {
var child:Object = parser.getElementById(id);
if (child == null) {
return Errors.OBJECT_NOT_FOUND;
}
return String(child.dispatchEvent(new MouseEvent(MouseEvent.CLICK)));
}
}
Under the hood - Apache Flex (7)
Registers your (custom) commands
public class MouseAction extends AbstractAction implements IAction {
public function MouseAction(parser:StageParser) {
super(parser);
}
public function attachActions():void {
attach("click", doFlexClick);
}
public function doFlexClick(id:String, args:String):String {
var child:Object = parser.getElementById(id);
if (child == null) {
return Errors.OBJECT_NOT_FOUND;
}
return String(child.dispatchEvent(new MouseEvent(MouseEvent.CLICK)));
}
}
FYI
● working with data
○ mock data
■ same result on every test
■ same result on every system
What's next?
● My way, not the highway...
● Custom components - custom commands
https://github.com/StackAndHeap/flexium/
QUESTIONS?
Twitter: @gert789
Email: gert.poppe@stackandheap.com

Contenu connexe

Tendances

Test Driven Development with JavaFX
Test Driven Development with JavaFXTest Driven Development with JavaFX
Test Driven Development with JavaFXHendrik Ebbers
 
Hyper-pragmatic Pure FP testing with distage-testkit
Hyper-pragmatic Pure FP testing with distage-testkitHyper-pragmatic Pure FP testing with distage-testkit
Hyper-pragmatic Pure FP testing with distage-testkit7mind
 
Google C++ Testing Framework in Visual Studio 2008
Google C++ Testing Framework in Visual Studio 2008Google C++ Testing Framework in Visual Studio 2008
Google C++ Testing Framework in Visual Studio 2008Andrea Francia
 
Izumi 1.0: Your Next Scala Stack
Izumi 1.0: Your Next Scala StackIzumi 1.0: Your Next Scala Stack
Izumi 1.0: Your Next Scala Stack7mind
 
prohuddle-utPLSQL v3 - Ultimate unit testing framework for Oracle
prohuddle-utPLSQL v3 - Ultimate unit testing framework for Oracleprohuddle-utPLSQL v3 - Ultimate unit testing framework for Oracle
prohuddle-utPLSQL v3 - Ultimate unit testing framework for OracleJacek Gebal
 
Scala, Functional Programming and Team Productivity
Scala, Functional Programming and Team ProductivityScala, Functional Programming and Team Productivity
Scala, Functional Programming and Team Productivity7mind
 
JAVASCRIPT TDD(Test driven Development) & Qunit Tutorial
JAVASCRIPT TDD(Test driven Development) & Qunit TutorialJAVASCRIPT TDD(Test driven Development) & Qunit Tutorial
JAVASCRIPT TDD(Test driven Development) & Qunit TutorialAnup Singh
 
An Introduction to JUnit 5 and how to use it with Spring boot tests and Mockito
An Introduction to JUnit 5 and how to use it with Spring boot tests and MockitoAn Introduction to JUnit 5 and how to use it with Spring boot tests and Mockito
An Introduction to JUnit 5 and how to use it with Spring boot tests and Mockitoshaunthomas999
 
iOS Unit Testing
iOS Unit TestingiOS Unit Testing
iOS Unit Testingsgleadow
 
JUnit 5 - The Next Generation
JUnit 5 - The Next GenerationJUnit 5 - The Next Generation
JUnit 5 - The Next GenerationKostadin Golev
 
Going native with less coupling: Dependency Injection in C++
Going native with less coupling: Dependency Injection in C++Going native with less coupling: Dependency Injection in C++
Going native with less coupling: Dependency Injection in C++Daniele Pallastrelli
 
Unit Test Your Database
Unit Test Your DatabaseUnit Test Your Database
Unit Test Your DatabaseDavid Wheeler
 
JUnit 5 - Evolution and Innovation - SpringOne Platform 2019
JUnit 5 - Evolution and Innovation - SpringOne Platform 2019JUnit 5 - Evolution and Innovation - SpringOne Platform 2019
JUnit 5 - Evolution and Innovation - SpringOne Platform 2019Sam Brannen
 

Tendances (19)

Test Driven Development with JavaFX
Test Driven Development with JavaFXTest Driven Development with JavaFX
Test Driven Development with JavaFX
 
Hyper-pragmatic Pure FP testing with distage-testkit
Hyper-pragmatic Pure FP testing with distage-testkitHyper-pragmatic Pure FP testing with distage-testkit
Hyper-pragmatic Pure FP testing with distage-testkit
 
Beyond Unit Testing
Beyond Unit TestingBeyond Unit Testing
Beyond Unit Testing
 
Google C++ Testing Framework in Visual Studio 2008
Google C++ Testing Framework in Visual Studio 2008Google C++ Testing Framework in Visual Studio 2008
Google C++ Testing Framework in Visual Studio 2008
 
Izumi 1.0: Your Next Scala Stack
Izumi 1.0: Your Next Scala StackIzumi 1.0: Your Next Scala Stack
Izumi 1.0: Your Next Scala Stack
 
Agile Swift
Agile SwiftAgile Swift
Agile Swift
 
prohuddle-utPLSQL v3 - Ultimate unit testing framework for Oracle
prohuddle-utPLSQL v3 - Ultimate unit testing framework for Oracleprohuddle-utPLSQL v3 - Ultimate unit testing framework for Oracle
prohuddle-utPLSQL v3 - Ultimate unit testing framework for Oracle
 
Agile mobile
Agile mobileAgile mobile
Agile mobile
 
Scala, Functional Programming and Team Productivity
Scala, Functional Programming and Team ProductivityScala, Functional Programming and Team Productivity
Scala, Functional Programming and Team Productivity
 
JAVASCRIPT TDD(Test driven Development) & Qunit Tutorial
JAVASCRIPT TDD(Test driven Development) & Qunit TutorialJAVASCRIPT TDD(Test driven Development) & Qunit Tutorial
JAVASCRIPT TDD(Test driven Development) & Qunit Tutorial
 
An Introduction to JUnit 5 and how to use it with Spring boot tests and Mockito
An Introduction to JUnit 5 and how to use it with Spring boot tests and MockitoAn Introduction to JUnit 5 and how to use it with Spring boot tests and Mockito
An Introduction to JUnit 5 and how to use it with Spring boot tests and Mockito
 
iOS Unit Testing
iOS Unit TestingiOS Unit Testing
iOS Unit Testing
 
JUnit 5 - The Next Generation
JUnit 5 - The Next GenerationJUnit 5 - The Next Generation
JUnit 5 - The Next Generation
 
Going native with less coupling: Dependency Injection in C++
Going native with less coupling: Dependency Injection in C++Going native with less coupling: Dependency Injection in C++
Going native with less coupling: Dependency Injection in C++
 
Agile Android
Agile AndroidAgile Android
Agile Android
 
Automation patterns on practice
Automation patterns on practiceAutomation patterns on practice
Automation patterns on practice
 
Unit Testing in iOS
Unit Testing in iOSUnit Testing in iOS
Unit Testing in iOS
 
Unit Test Your Database
Unit Test Your DatabaseUnit Test Your Database
Unit Test Your Database
 
JUnit 5 - Evolution and Innovation - SpringOne Platform 2019
JUnit 5 - Evolution and Innovation - SpringOne Platform 2019JUnit 5 - Evolution and Innovation - SpringOne Platform 2019
JUnit 5 - Evolution and Innovation - SpringOne Platform 2019
 

En vedette

Empathize and define - Student to Work transition
Empathize and define - Student to Work transitionEmpathize and define - Student to Work transition
Empathize and define - Student to Work transitionVaishu Narayan
 
Empathize and define
Empathize and defineEmpathize and define
Empathize and definepmoorthy0710
 
Digital Strategy for Target
Digital Strategy for TargetDigital Strategy for Target
Digital Strategy for TargetErica Nappier
 
Eating our Own Dogfood - How Automic Automates
Eating our Own Dogfood - How Automic AutomatesEating our Own Dogfood - How Automic Automates
Eating our Own Dogfood - How Automic AutomatesCA | Automic Software
 

En vedette (6)

Pdf's in PHP
Pdf's in PHPPdf's in PHP
Pdf's in PHP
 
Empathize and define - Student to Work transition
Empathize and define - Student to Work transitionEmpathize and define - Student to Work transition
Empathize and define - Student to Work transition
 
Empathize and define
Empathize and defineEmpathize and define
Empathize and define
 
Digital Strategy for Target
Digital Strategy for TargetDigital Strategy for Target
Digital Strategy for Target
 
Prototype
PrototypePrototype
Prototype
 
Eating our Own Dogfood - How Automic Automates
Eating our Own Dogfood - How Automic AutomatesEating our Own Dogfood - How Automic Automates
Eating our Own Dogfood - How Automic Automates
 

Similaire à Automated User Tests with Apache Flex

MobileConf 2021 Slides: Let's build macOS CLI Utilities using Swift
MobileConf 2021 Slides:  Let's build macOS CLI Utilities using SwiftMobileConf 2021 Slides:  Let's build macOS CLI Utilities using Swift
MobileConf 2021 Slides: Let's build macOS CLI Utilities using SwiftDiego Freniche Brito
 
JCConf 2016 - Dataflow Workshop Labs
JCConf 2016 - Dataflow Workshop LabsJCConf 2016 - Dataflow Workshop Labs
JCConf 2016 - Dataflow Workshop LabsSimon Su
 
Rewriting a Plugin Architecture 3 Times to Harness the API Economy
Rewriting a Plugin Architecture 3 Times to Harness the API EconomyRewriting a Plugin Architecture 3 Times to Harness the API Economy
Rewriting a Plugin Architecture 3 Times to Harness the API EconomyTim Pettersen
 
OWASP ZAP Workshop for QA Testers
OWASP ZAP Workshop for QA TestersOWASP ZAP Workshop for QA Testers
OWASP ZAP Workshop for QA TestersJavan Rasokat
 
Php Conference Brazil - Phalcon Giant Killer
Php Conference Brazil - Phalcon Giant KillerPhp Conference Brazil - Phalcon Giant Killer
Php Conference Brazil - Phalcon Giant KillerJackson F. de A. Mafra
 
Plugins And Making Your Own
Plugins And Making Your OwnPlugins And Making Your Own
Plugins And Making Your OwnLambert Beekhuis
 
Profiling PHP - AmsterdamPHP Meetup - 2014-11-20
Profiling PHP - AmsterdamPHP Meetup - 2014-11-20Profiling PHP - AmsterdamPHP Meetup - 2014-11-20
Profiling PHP - AmsterdamPHP Meetup - 2014-11-20Dennis de Greef
 
SymfonyCon Berlin 2016 - Symfony Plugin for PhpStorm - 3 years later
SymfonyCon Berlin 2016 - Symfony Plugin for PhpStorm - 3 years laterSymfonyCon Berlin 2016 - Symfony Plugin for PhpStorm - 3 years later
SymfonyCon Berlin 2016 - Symfony Plugin for PhpStorm - 3 years laterHaehnchen
 
Introduction to Google App Engine with Python
Introduction to Google App Engine with PythonIntroduction to Google App Engine with Python
Introduction to Google App Engine with PythonBrian Lyttle
 
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)Bastian Feder
 
Riga Dev Day - Automated Android Continuous Integration
Riga Dev Day - Automated Android Continuous IntegrationRiga Dev Day - Automated Android Continuous Integration
Riga Dev Day - Automated Android Continuous IntegrationNicolas Fränkel
 
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
 
PyCon AU 2012 - Debugging Live Python Web Applications
PyCon AU 2012 - Debugging Live Python Web ApplicationsPyCon AU 2012 - Debugging Live Python Web Applications
PyCon AU 2012 - Debugging Live Python Web ApplicationsGraham Dumpleton
 
How to Reverse Engineer Web Applications
How to Reverse Engineer Web ApplicationsHow to Reverse Engineer Web Applications
How to Reverse Engineer Web ApplicationsJarrod Overson
 
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Fabrice Bernhard
 

Similaire à Automated User Tests with Apache Flex (20)

MobileConf 2021 Slides: Let's build macOS CLI Utilities using Swift
MobileConf 2021 Slides:  Let's build macOS CLI Utilities using SwiftMobileConf 2021 Slides:  Let's build macOS CLI Utilities using Swift
MobileConf 2021 Slides: Let's build macOS CLI Utilities using Swift
 
JCConf 2016 - Dataflow Workshop Labs
JCConf 2016 - Dataflow Workshop LabsJCConf 2016 - Dataflow Workshop Labs
JCConf 2016 - Dataflow Workshop Labs
 
Rewriting a Plugin Architecture 3 Times to Harness the API Economy
Rewriting a Plugin Architecture 3 Times to Harness the API EconomyRewriting a Plugin Architecture 3 Times to Harness the API Economy
Rewriting a Plugin Architecture 3 Times to Harness the API Economy
 
React native
React nativeReact native
React native
 
Secure PHP environment
Secure PHP environmentSecure PHP environment
Secure PHP environment
 
OWASP ZAP Workshop for QA Testers
OWASP ZAP Workshop for QA TestersOWASP ZAP Workshop for QA Testers
OWASP ZAP Workshop for QA Testers
 
Php Conference Brazil - Phalcon Giant Killer
Php Conference Brazil - Phalcon Giant KillerPhp Conference Brazil - Phalcon Giant Killer
Php Conference Brazil - Phalcon Giant Killer
 
Plugins And Making Your Own
Plugins And Making Your OwnPlugins And Making Your Own
Plugins And Making Your Own
 
Profiling PHP - AmsterdamPHP Meetup - 2014-11-20
Profiling PHP - AmsterdamPHP Meetup - 2014-11-20Profiling PHP - AmsterdamPHP Meetup - 2014-11-20
Profiling PHP - AmsterdamPHP Meetup - 2014-11-20
 
SymfonyCon Berlin 2016 - Symfony Plugin for PhpStorm - 3 years later
SymfonyCon Berlin 2016 - Symfony Plugin for PhpStorm - 3 years laterSymfonyCon Berlin 2016 - Symfony Plugin for PhpStorm - 3 years later
SymfonyCon Berlin 2016 - Symfony Plugin for PhpStorm - 3 years later
 
Introduction to Google App Engine with Python
Introduction to Google App Engine with PythonIntroduction to Google App Engine with Python
Introduction to Google App Engine with Python
 
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
 
Riga Dev Day - Automated Android Continuous Integration
Riga Dev Day - Automated Android Continuous IntegrationRiga Dev Day - Automated Android Continuous Integration
Riga Dev Day - Automated Android Continuous Integration
 
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)
 
PhoneGap
PhoneGapPhoneGap
PhoneGap
 
PyCon AU 2012 - Debugging Live Python Web Applications
PyCon AU 2012 - Debugging Live Python Web ApplicationsPyCon AU 2012 - Debugging Live Python Web Applications
PyCon AU 2012 - Debugging Live Python Web Applications
 
manual
manualmanual
manual
 
manual
manualmanual
manual
 
How to Reverse Engineer Web Applications
How to Reverse Engineer Web ApplicationsHow to Reverse Engineer Web Applications
How to Reverse Engineer Web Applications
 
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
 

Dernier

The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 

Dernier (20)

The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 

Automated User Tests with Apache Flex

  • 1. Automated User Tests with Apache Flex Gert Poppe @gert789
  • 2. About me A Belgian consultant working at Stack & Heap. A passionate RIA developer. A ZEND certified PHP Engineer. A huge fan of the Randori Framework.
  • 3. What are we talking about? Wikipedia says: ... test automation is the use of special software (separate from the software being tested) to control the execution of tests and the comparison of actual outcomes to predicted outcomes. Test automation can automate some repetitive but necessary tasks in a formalized testing process already in place, or add additional testing that would be difficult to perform manually ...
  • 4. Why should you bother? ● Efficiency ● More complete error reports ● Huge time savings ● A more complete code coverage
  • 5. Why did we bother? While taking over an existing project ● Huge and complicated code base ● No existing unit tests ● Complaints by users: ○ a lot of bugs in the GUI ○ a lot of recurrent bugs
  • 6. How did we start?
  • 7. External testing tool Selenium A suite of tools to automate your web browser. External Interface communication between your browser and the Flash Player.
  • 8. ● Java Test ○ Selenium for Java ○ Standalone Selenium server ○ FlexiumLink and FlashSelenium ● Flex Application ○ Flexium https://github.com/StackAndHeap/flexium The Selenium setup
  • 10. public Boolean click(String objectId) throws Exception { delay(); if(isReady()) { String result = call("doFlexClick", objectId, ""); return checkResult(result); } return false; } Under the hood - Selenium (1)
  • 11. public Boolean click(String objectId) throws Exception { delay(); if(isReady()) { String result = call("doFlexClick", objectId, ""); return checkResult(result); } return false; } Under the hood - Selenium (1)
  • 12. public Boolean click(String objectId) throws Exception { delay(); if(isReady()) { String result = call("doFlexClick", objectId, ""); return checkResult(result); } return false; } Under the hood - Selenium (1)
  • 13. public Boolean click(String objectId) throws Exception { delay(); if(isReady()) { String result = call("doFlexClick", objectId, ""); return checkResult(result); } return false; } Under the hood - Selenium (1)
  • 14. public Boolean click(String objectId) throws Exception { delay(); if(isReady()) { String result = call("doFlexClick", objectId, ""); return checkResult(result); } return false; } Under the hood - Selenium (1)
  • 15. Under the hood - Selenium (2)
  • 16. Under the hood - Selenium (3)
  • 17. ● Flexium ○ Compiles into your application ○ Parsing of your applications Stage ○ Registers your (custom) commands Under the hood - Apache Flex (1)
  • 18. Compiles into your application ... separate from the software being tested... 1) Use a Mixin ... [Mixin] public class Flexium extends Sprite { ... Under the hood - Apache Flex (2)
  • 19. Compiles into your application ... separate from the software being tested... 2) Include library include-libraries library [...] Under the hood - Apache Flex (2)
  • 20. Parsing of your applications stage Every component that gets added to the stage will be parsed by the AS3-commons Stage Processing Library http://as3commons.org/as3-commons-stageprocessing/index.html Under the hood - Apache Flex (3)
  • 21. Parsing of your applications stage with AS3Commons private var _registry:FlashStageObjectProcessorRegistry; private function initProcessor():void { _registry = new FlashStageObjectProcessorRegistry(); _registry.useStageDestroyers = true; _registry.registerStageObjectProcessor( new EventDispatchingObjectProcessor(this), new EventDispatchingObjectSelector() ); _registry.initialize(); } Under the hood - Apache Flex (4)
  • 22. Parsing of your applications stage with AS3Commons private var _registry:FlashStageObjectProcessorRegistry; private function initProcessor():void { _registry = new FlashStageObjectProcessorRegistry(); _registry.useStageDestroyers = true; _registry.registerStageObjectProcessor( new EventDispatchingObjectProcessor(this), new EventDispatchingObjectSelector() ); _registry.initialize(); } Under the hood - Apache Flex (4)
  • 23. Parsing of your applications stage with AS3Commons private var _registry:FlashStageObjectProcessorRegistry; private function initProcessor():void { _registry = new FlashStageObjectProcessorRegistry(); _registry.useStageDestroyers = true; _registry.registerStageObjectProcessor( new EventDispatchingObjectProcessor(this), new EventDispatchingObjectSelector() ); _registry.initialize(); } Under the hood - Apache Flex (4)
  • 24. Parsing of your applications stage with AS3Commons private var _registry:FlashStageObjectProcessorRegistry; private function initProcessor():void { _registry = new FlashStageObjectProcessorRegistry(); _registry.useStageDestroyers = true; _registry.registerStageObjectProcessor( new EventDispatchingObjectProcessor(this), new EventDispatchingObjectSelector() ); _registry.initialize(); } Under the hood - Apache Flex (4)
  • 25. Parsing of your applications stage with AS3Commons public class EventDispatchingObjectSelector implements IObjectSelector { public function approve(object:Object):Boolean { return object is UIComponent; } } Under the hood - Apache Flex (5)
  • 26. Parsing of your applications stage with AS3Commons public function process(displayObject:DisplayObject):DisplayObject { _stageParser.addElement((displayObject as UIComponent).id, displayObject); return displayObject; } public function destroy(displayObject:DisplayObject):DisplayObject { _stageParser.removeElement((displayObject as UIComponent).id); return displayObject; } Under the hood - Apache Flex (6)
  • 27. Under the hood - Apache Flex (7) Registers your (custom) commands public class MouseAction extends AbstractAction implements IAction { public function MouseAction(parser:StageParser) { super(parser); } public function attachActions():void { attach("click", doFlexClick); } public function doFlexClick(id:String, args:String):String { var child:Object = parser.getElementById(id); if (child == null) { return Errors.OBJECT_NOT_FOUND; } return String(child.dispatchEvent(new MouseEvent(MouseEvent.CLICK))); } }
  • 28. Under the hood - Apache Flex (7) Registers your (custom) commands public class MouseAction extends AbstractAction implements IAction { public function MouseAction(parser:StageParser) { super(parser); } public function attachActions():void { attach("click", doFlexClick); } public function doFlexClick(id:String, args:String):String { var child:Object = parser.getElementById(id); if (child == null) { return Errors.OBJECT_NOT_FOUND; } return String(child.dispatchEvent(new MouseEvent(MouseEvent.CLICK))); } }
  • 29. Under the hood - Apache Flex (7) Registers your (custom) commands public class MouseAction extends AbstractAction implements IAction { public function MouseAction(parser:StageParser) { super(parser); } public function attachActions():void { attach("click", doFlexClick); } public function doFlexClick(id:String, args:String):String { var child:Object = parser.getElementById(id); if (child == null) { return Errors.OBJECT_NOT_FOUND; } return String(child.dispatchEvent(new MouseEvent(MouseEvent.CLICK))); } }
  • 30. Under the hood - Apache Flex (7) Registers your (custom) commands public class MouseAction extends AbstractAction implements IAction { public function MouseAction(parser:StageParser) { super(parser); } public function attachActions():void { attach("click", doFlexClick); } public function doFlexClick(id:String, args:String):String { var child:Object = parser.getElementById(id); if (child == null) { return Errors.OBJECT_NOT_FOUND; } return String(child.dispatchEvent(new MouseEvent(MouseEvent.CLICK))); } }
  • 31. Under the hood - Apache Flex (7) Registers your (custom) commands public class MouseAction extends AbstractAction implements IAction { public function MouseAction(parser:StageParser) { super(parser); } public function attachActions():void { attach("click", doFlexClick); } public function doFlexClick(id:String, args:String):String { var child:Object = parser.getElementById(id); if (child == null) { return Errors.OBJECT_NOT_FOUND; } return String(child.dispatchEvent(new MouseEvent(MouseEvent.CLICK))); } }
  • 32. Under the hood - Apache Flex (7) Registers your (custom) commands public class MouseAction extends AbstractAction implements IAction { public function MouseAction(parser:StageParser) { super(parser); } public function attachActions():void { attach("click", doFlexClick); } public function doFlexClick(id:String, args:String):String { var child:Object = parser.getElementById(id); if (child == null) { return Errors.OBJECT_NOT_FOUND; } return String(child.dispatchEvent(new MouseEvent(MouseEvent.CLICK))); } }
  • 33. FYI ● working with data ○ mock data ■ same result on every test ■ same result on every system
  • 34. What's next? ● My way, not the highway... ● Custom components - custom commands