• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Quality Best Practices & Toolkit for Enterprise Flex
 

Quality Best Practices & Toolkit for Enterprise Flex

on

  • 4,956 views

Quality Best Practices & Toolkit for Enterprise Flex ...

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

Statistics

Views

Total Views
4,956
Views on SlideShare
4,369
Embed Views
587

Actions

Likes
7
Downloads
122
Comments
0

13 Embeds 587

http://blogs.adobe.com 287
http://www.jroller.com 142
http://jroller.com 130
http://www.slideshare.net 11
http://www.techgig.com 6
http://10.150.200.57 3
http://javadev.jroller.com 2
http://blogs-stage.adobe.com 1
http://ftp.jroller.com 1
http://static.slidesharecdn.com 1
http://translate.googleusercontent.com 1
http://jroller.org 1
https://www.linkedin.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Quality Best Practices & Toolkit for Enterprise Flex Quality Best Practices & Toolkit for Enterprise Flex Presentation Transcript

    • 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.