SlideShare uma empresa Scribd logo
1 de 36
Baixar para ler offline
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

Mais conteúdo relacionado

Mais procurados

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
 

Mais procurados (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
 

Destaque

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
 

Destaque (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
 

Semelhante a 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
 

Semelhante a 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)
 

Último

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 

Último (20)

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 

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