Quality *Best Practices *& Toolkit *for *Enterprise Flex

50 %
50 %
Information about Quality *Best Practices *& Toolkit *for *Enterprise Flex
Technology

Published on July 22, 2009

Author: francoisledroff

Source: slideshare.net

Description

Quality Best Practices & Toolkit for Enterprise Flex

Presentation given at the French Flex User group : "les tontons flexeurs" on the 21st of July 2009

Author : Xavier Agnetti, François Le Droff (and Alex Ulhmann)

Copyright: Adobe

Quality Best Practices & Toolkit for Enterprise Flex ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Xavier Agnetti  Adobe Consulting  A Flex geek :  leader FlexPMD  Contributeur FlexUnit  conférencier à MAX,  Contact:  xagnetti<at>adobe.com ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.

François Le Droff   Adobe TXI (Technology & eXperience Innovation)  10 ans (RIA & web 1+n.0)  OSS geek :  membre de  ossgtp, du ParisJUG,  Tontons Flexeurs  contributeur sur qsos, xradar , fna  conférencier à MAX, Solution Linux, Tontons Flexeurs,  BreizhJUG, RiveriaJUG  Contact:  ledroff<at>adobe.com ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.

François Le Droff  blog : http://www.droff.com ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Et vous ?  Flex ?  FlexUnit ?  Fluint ?  FlexCover ?  FlexMonkey ?  RiaTest ?  Build and CI ?  Ant ?  Maven ?  Hudson ?  ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Agenda  Unit Test Best Practice (Alex )  FlexUnit  FlexUnit Demo  Mock  Code Coverage  Functional Test  Load Test  Static Code Analysis  Build  Continuous Integration ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.

UnitTest Best Practices ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Our Agile Testing Principles. Test Everything – Accept and Minimize Frameworks, Integration Untestable Code etc. Test Concerns Separately Test Many Things At Once ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Flex - Testing Concerns Separately AccidentWizardView Presentation Graphic Layer VehicleDescriptorView MXML UIComponent DisplayObject Presentation Behavior Layer AccidentWizardPM VehicleDescriptorPM Presentation Models Utilities Customer Domain / Application Layer CarCompany Utilities / Domain Models Application Models Factories IncidentDescriptor Persistence Layer SaveReportCommand Commands / Brokers / Translators / IncidentReportTranslator Delegates DataModels Utilities “saveReport” Persistence Definition Layer RemoteObject Network Access File Access LocalConnection ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Our Agile Testing Principles. Test First Test Last Run Tests Continuously One Test Suite Rules Them All ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.

State Verification Exercise Assert state Unit test Object under test Assert return ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.

FlexUnit ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Flex Frameworks and Tools: UnitTesting  FlexUnit : http://opensource.adobe.com/wiki/display/flexunit/FlexUnit ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Flex Frameworks and Tools: Unit Testing  FlexUnit  Very similar to JUnit  Event test enabled ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Flex Frameworks and Tools: UnitTesting  FlexUnit Html Reports: ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Flex Frameworks and Tools: UnitTesting  FlexUnit Dashboards: ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Flex Unit Next  Fluint : http://code.google.com/p/fluint/  FlexUnit4 : http://opensource.adobe.com/wiki/display/flexunit/FlexUnit+4+feature+ov erview ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Demo FlexUnit ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Testing Events Presentation Graphic Layer MXML UIComponent DisplayObject Presentation Behavior Layer Presentation Models Utilities Domain / Application Layer Domain Models Utilities / Application Models Factories Persistence Layer Commands / Brokers / Translators / Delegates DataModels Utilities Persistence Definition Layer Network Access File Access LocalConnection ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Demo ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Mock ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Isolating The Object under Test Production Depended-on Object Object under Test Unit Tests Test Double ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Substitution via Dependency Injection (IoC) public function PolicyPM( policyValidator : IPolicyValidator ) { } model = new PolicyPM( new PolicyValidator() ); model = new PolicyPM( new PolicyValidatorDummy() ); Substitution via Dependency Injection Interface Domain Object under Test Interface Domain Test Double Interface ® 15 Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Behavior Verification Testing What Objects Do Behind the Scenes Set expected PolicyValidatorMock behavior Assert state Exercise PolicyPMTest Exercise PolicyPM ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Behavior Verification Testing What Objects Do Behind the Scenes var mock : PolicyValidatorMock = new PolicyValidatorMock(); mock.mock.method( “validate” ).withNoArgs.once; //exercise var model : PolicyPM = new PolicyPM( mock ); model.next(); mock.mock.verify(); ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Our Agile Testing Principles. State Verification First Behavior Verification Testing Public API Testing Internal Behavior Write Test as Code Write Java/AS Docs Examples ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Making Untestable APIs Testable Production Code public class LocalConnectionWrapper extends LocalConnection implements ILocalConnection { } public interface ILocalConnection extends ISendingLocalConnection, IReceivingLocalConnection { } ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Making Untestable APIs Testable public interface ISendingLocalConnection extends IEventDispatcher { function send( connectionName : String, handler : String, ...args ) : void; } public interface IReceivingLocalConnection { function set client( value : Object ) : void; function allowDomain( ...domains ) : void; function connect( connectionName : String) : void; function close() : void; } ® 20 Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Substitution via Overriding Object under Test Untestable behaviour Test Subclass Substitution ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Substitution via Overriding Production Code protected function createReceivingConnection() : IReceivingConnection { return new LocalConnectionWrapper(); } Test Subclass override protected function createReceivingConnection() : IReceivingConnection { return new LocalConnectionMock(); } ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Substitution via Overriding var mock : LocalConnectionMock = new LocalConnectionMock(); mock.mock.method( “send” ).withArgs( “connection” ).once; //exercise var connector : TestSubclass = new TestSubclass( mock ); connector.go(); mock.mock.verify(); ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Mock tooling ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Mock Frameworks  mock-as3: http://code.google.com/p/mock-as3  Used by Adobe Consulting  Mock4AS: http://code.google.com/p/mock4as ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Code Coverage ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Code Coverage Flexcover - Custom Compiler Approach http://code.google.com/p/flexcover ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Code Coverage Flexcover - Custom Compiler Approach http://code.google.com/p/flexcover ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Hudson ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Sonar ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Functional Tests ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Flex Frameworks and Tools: Testing  Functional Testing  OS:  Selenium for Flash  FlexMonkey, FunFX   Mercury QTP  IBM Rational Functional Tester  RIATest ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Load/Stress/Endurance Tests ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Flex Frameworks and Tools: Testing  Load and Stress Testing  JMeter, OpenSTA, Grinder   Other commercial (Flex/AMF specific) products :  NeoLoad  WebLoad ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Static Code Analysis ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Flex Frameworks and Tools: Building : Quality  Quality Reports within your build  AS3NCSS  http://localhost:9999/hudson/job/cairngorm/site/javancss.html  FlexPMD  http://localhost:9999/hudson/job/cairngorm/12/pmdResult/ ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Flex PMD ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Demo FlexPMD ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Build ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Flex Frameworks and Tools: Building  Ant :  FlexAntTasks  Ant : Antennae • Maven : • Flex-mojos • Alternatives : • ServeBox (Projet Français) • and Israfil • Archetypes  FlexMojos V3 est un projet sonatype  Sonatype et Adobe travaillent ensemble pour le support FB dans m2eclipse ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Managing Dependencies  Maven (or Ant + Ivy)  Demo : http://localhost:9999/hudson/job/cairngormenterprise/site/dependencies.html ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Managing Dependencies ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Flex Frameworks and Tools: UnitTest within your Build  FlexUnit within your build  Maven  FlexMojos V3 est un projet sonatype  Sonatype et Adobe travaillent ensemble pour le support FB dans m2eclipse ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.

 FlexPMD within your build  Maven ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.

CI ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Flex Frameworks and Tools: Building and CC  Quality within your build : CC  Demo : http://localhost:9999/hudson/ ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Des questions ? ® Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Add a comment

Related presentations

Presentación que realice en el Evento Nacional de Gobierno Abierto, realizado los ...

In this presentation we will describe our experience developing with a highly dyna...

Presentation to the LITA Forum 7th November 2014 Albuquerque, NM

Un recorrido por los cambios que nos generará el wearabletech en el futuro

Um paralelo entre as novidades & mercado em Wearable Computing e Tecnologias Assis...

Microsoft finally joins the smartwatch and fitness tracker game by introducing the...

Related pages

Automated testing and quality control for “Enterprise ...

HOME > Automated testing and quality control for “Enterprise” Flex ... automated testing and quality ... Best Practices & Toolkit for Enterprise ...
Read more

is available on Safari books online

Hier sollte eine Beschreibung angezeigt werden, diese Seite lässt dies jedoch nicht zu.
Read more

Best Practices for Migrating SAP Environments

An Oracle White Paper April 2010 . Best Practices for Migrating SAP Environments
Read more

Application Compatibility Toolkit (ACT) (Windows)

... Windows Server 2008 R2 Application Quality Cookbook Tools, Best Practices, ... Application Compatibility Toolkit ... for your enterprise ...
Read more

Flash Player enterprise deployment | Adobe Developer ...

Flash Player enterprise deployment. ... but it doesn't hold a candle to Flex in terms of data points, and the ease of using and accessing the application ...
Read more

Best practices for data migration. - IBM - United States

Best practices for data migration. Methodologies for planning, designing, ... will help determine the best software technology to use for each migration.
Read more

Evaluating Best Practices for Electronic Document ...

This post defines EDM best practices, ... Evaluating “Best Practices” for Electronic ... yet appropriately secure access to quality images that bear ...
Read more

Acrobat-Reader Enterprise Toolkit Home - Adobe: Creative ...

Welcome to the Acrobat Enterprise Toolkit (ETK). ... Get the Enterprise Guide and/or navigate to the forums, FAQ, tutorials, and other resources.
Read more

Enterprise social software - Wikipedia, the free encyclopedia

Enterprise social software (also known as or regarded as a major component of Enterprise 2.0), comprises social software as used in "enterprise" (business/ ...
Read more