Adobe
Products
Acrobat
Creative Cloud
Creative Suite
Digital Marketing Suite
Digital Publishing Suite
Elements
Photoshop
Touch Apps
Student and Teacher Editions
More products
Solutions
Digital marketing
Digital media
Education
Financial services
Government
Web Experience Management
More solutions
Learning Help Downloads Company
Buy
Home use for personal and home office
Education for students, educators, and staff
Business for small and medium businesses
Licensing programs for businesses, schools, and government
Special offers
Search
 
Info Sign in
Welcome,
My cart
My orders My Adobe
My Adobe
My orders
My information
My preferences
My products and services
Sign out
Why sign in? Sign in to manage your account and access trial downloads, product extensions, community areas, and more.
Adobe
Products Sections Buy   Search  
Solutions Company
Help Learning
Sign in Sign out My orders My Adobe
Preorder Estimated Availability Date. Your credit card will not be charged until the product is shipped. Estimated availability date is subject to change. Preorder Estimated Availability Date. Your credit card will not be charged until the product is ready to download. Estimated availability date is subject to change.
Qty:
Purchase requires verification of academic eligibility
Subtotal
Review and Checkout
Adobe Developer Connection / Flex Developer Center /

Using automated tools across the lifecycle to develop higher quality Flex applications

by Sergei Sokolov

Sergei Sokolov
  • smartbear.com

Content

  • Software quality and wasted effort
  • The V model
  • Linking Requirements and Verfication/Validation
  • Automating code review tasks with CodeCollaborator
  • Testing with TestComplete
  • Where to go from here

Created

16 May 2011

Page tools

Share on Facebook
Share on Twitter
Share on LinkedIn
Bookmark
Print
best practice collaboration Flex RIA testing validation

Requirements

Prerequisite knowledge

Some experience with Flex development will help you make the most of this article.

User level

All

Required products

  • Flash Builder (Download trial)

In the past, Flash was associated mostly with timeline-based movies and games developed by a handful of people. Today, enterprise-grade Rich Internet Applications (RIA) based on the Flex Framework are common. Systems implemented using Flash Builder and Flex are becoming increasingly sophisticated. On the client-side, these systems include a rich user interface (requiring design talent, tools, and asset management) and complex business logic. Client-side applications typically also include data services that must handle not only structured data but images, video, and documents. As these applications access Java EE back-end servers, enhanced content, and service-oriented components across multiple platforms, they require comprehensive validation, particularly in financial, insurance, and medical industries. As application scope and complexity increase, so do the project teams. To be effective, larger teams require solid infrastructure supporting collaborative and quality-centric efforts. Because Flex developers face raised expectations for quality, efficiency, and productivity (or concerns about lack thereof), they need to approach the lifecycle of Flex applications on the same terms as applications developed in languages such as Java, C#, and C++.

This article explores lifecycle automation tools for developing quality Flex applications, including solutions from SmartBear.

Software quality and wasted effort

Software quality is not one dimensional. It involves not just how you work (processes), but how you think and plan (disciplines), and what tools you use. It is well understood that software development is really a multiphase process comprising requirements, design, implementation, optimization, bug fixes, engineering changes, and so on. Defects can be introduced in any of these phases; therefore, there is not a single quality oriented technique that can be applied to magically render the software bug-free.

The biggest impact of poor initial software quality is waste, which causes teams to work more than needed, the software releases to cost more, or both. Studies have found that, on average, more than 50% of software development time is spent on wasted effort that does not result in anything useful. Waste may take many forms: implementing the wrong requirements, creating an inappropriate design, coding mistakes (it still holds true that there is a bug per roughly every 50 initial lines of code), chasing down a memory leak, breaking working code when making changes, manually testing your UI time after time, and so on. While a certain amount of waste is probably unavoidable, there are plenty of reasons and very practical ways to reduce it.

There is nothing really earth shaking in making software of better quality. The two key ingredients of a solution are just common sense: continuously improving development skills and knowledge, and staying disciplined. Following that, since no one is really perfect, having someone or something (whether a computer or a human) else check your work (however rigorously is appropriate) is a best practice. Finally, measuring your results helps you make informed decisions about where to apply resources to make further improvements.

For individuals and more importantly across teams there are many repetitive steps in the software development cycle, including nightly builds and regression tests among others. Of course, creativity is required as well, but repetition ultimately causes boredom and kills creativity. The solution to fighting boredom is simple: automate repetitive steps with tools, and clear more time for creative work.

The V model

When considering software tools to deploy, it helps to have a complete picture of the system development process in mind. Among the simplest representations of the development process is the V model or V cycle (see Figure 1). Implementation proceeds from requirements to design to code along the left side, and the right side comprises testing, verification, and maintenance activities. Logically, whatever can be inexpensively automated along this V cycle would be the first to tackle. As you explore the options, keep in mind that sometimes good tools happen to be free, and sometimes they are not.

Figure 1. The V model for software development.
Figure 1. The V model for software development.

Linking Requirements and Verfication/Validation

Requirements capture is critical for a project, it defines what developers are there to build and what testing is going to conduct validation and verification against. In the past, a Word document or a simple web document used to do the job, but now teams are using more formal approaches, and for a good reason. Specifically, the ability to plan and link requirements to downstream activities (design, and especially coding), as well as across the V to tests offers significantly more visibility into the production of software. With teams working across multiple locations and across time zones, web access is practically mandatory. This is an area where improving individual and team knowledge will pay off, investigating trends and techniques in AGILE (use cases and stories leads to better user-developer communication) and Test-Driven Development (TDD). Fortunately, there is no shortage of good web-based requirements (and defect management) tools. Some tools even offer bridges to Mylyn for Eclipse and some Agile automation, for those who use this development approach. Check out, for example, Atlassian JIRA, FogBugz, or SmartBear ALMComplete and its free versions, DevPlanner, and QAPlanner.

Automating code review tasks with CodeCollaborator

Code review is one of the conceptually simplest quality improvement tasks you can do during software development. It has also been proven to be most effective at finding defects, with an average of 60% and up to 90% defects found. In addition to direct code cleansing effects, it also has other benefits, such as improving teamwork and educating developers with less experience. The only problem is that, in its traditional form, code review is a manual process, making it somewhat tedious and effort intensive. In some cases it borders on a waste of time if it is not well managed. Not to mention that checking someone else's work may appear less than exciting to developers.

In reality, code review is a prime example of an inherently creative process–comprehending someone else's code and looking for defects in it–that can be assisted with an automation framework. With tens of thousands of active users around the world, CodeCollaborator from SmartBear (see Figure 2) is among the most popular automated code review tools. It's available as a plug-in to Eclipse, which means it will work seamlessly with Flash Builder, or as a purely browser-based system, which means direct development using the Flex SDK is also supported. CodeCollaborator removes the drudgery from code reviews by handling the boring tasks, including file preparation, notifications, setting up appropriate diff views, and keeping track of the process. It enables real collaboration in real time that is squarely aimed at making code better. The newest version supports integration with TaskTop's Mylyn, which presents code review tasks right in Eclipse.

Figure 2. CodeCollaborator leverages Eclipse to set up code reviews inside the IDE.
Figure 2. CodeCollaborator leverages Eclipse to set up code reviews inside the IDE.

Testing with TestComplete

When it comes to functional testing, you must ensure that once implemented, the code does what it was specified to do (this test happens once). After that, you must ensure the code continues to do what it was specified to do (this regression testing happens many times). Ideally, the test used for the first case (validation) is the same test that is used in the second case (regression testing). There are many reasons to reuse test cases, including reducing wasted effort. Depending on the nature of the implemented feature, a unit test, an API integration test, or a GUI-based functional test may be more appropriate.

Flex is typically used to implement the UI layer, so some form of regression testing of the Flex application's UI is a must. TestComplete from SmartBear supports Flex 4.5 as well as earlier 3.x and 4.x versions. It takes care of both key functional testing tasks. First, it helps with the single-pass validation of every step of a functional scenario by capturing screenshots and inserting checkpoints to compare the actual behavior to whatever was specified. Then it automatically runs the test in regression mode to verify that the behavior stays the same over time. One of the advantages of TestComplete is that it has the capability to test a Flex application as is without any additional libraries or code changes (although it does require Adobe Flash Player content debugger). This enables you to test the actual software that is going to go to your users. Checkout this webinar and article Functional Testing of Adobe Flex Applications: Four Benefits of Using TestComplete on the tool and how to test Flex apps

One of the compelling features of TestComplete is its ability to record tests frame by frame (corresponding to use case steps). It not only uses these frames to aid in verification, but also to extend tests using additional tweaks or adding checkpoints right from the selected frame, without rerecording the whole test (see Figure 3).

Figure 3. Adding a checkpoint to an existing test against the FlexStore application.
Figure 3. Adding a checkpoint to an existing test against the FlexStore application.

Where to go from here

This article covered some of the key aspects of automating Flex system development using third-party tools. Whether you choose a tool from a commercial vendor, or a free or open source alternative, be sure to evaluate carefully. Once you deploy a tool, make a commitment to it, so you can put more of your mundane development tasks on autopilot and streamline your development life cycle.

Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Unported License.

More Like This

  • From tags to riches: Going from Web 1.0 to Flex
  • DigiPri Widgets Sales Dashboard – Part 3: Understanding the dashboard application
  • DigiPri Widgets sales dashboard – Part 2: Setting up the server application
  • Flexible Rails excerpt: Refactoring to RubyAMF
  • DigiPri Widgets Sales Dashboard – Part 4: Exploring the code in Flash Builder
  • Tool-based approaches for data-centric RIA development
  • DigiPri Widgets Sales Dashboard – Part 1: Overview
  • Yahoo! Maps collaboration using Flex and BlazeDS
  • Creating a rich buying experience with a data-driven RIA
  • Building a portable RIA with Flex and PDF

Tutorials & Samples

Tutorials

  • Flex mobile performance checklist
  • Flex and Maven with Flexmojos – Part 3: Journeyman
  • Migrating Flex 3 applications to Flex 4.5 – Part 4

Samples

  • Twitter Trends
  • Flex 4.5 reference applications
  • Mobile Trader Flex app on Android Market

Flex User Forum

More
07/25/2011 Flash Player Debug Issues - Safari 5.1 & Chrome 13
04/22/2012 Loader png - wrong color values in BitmapData
04/22/2012 HTTPService and crossdomain.xml doesn't work as expected
04/23/2012 Memory related crashes in Flex application

Flex Cookbook

More
04/06/2012 How to detect screen resize with a SkinnableComponent
02/29/2012 Embed Stage3D content inside Flex application components
02/15/2012 Custom WorkFlow Component
02/09/2012 Using Camera with a MediaContainer instead of VideoDisplay

Products

  • Acrobat
  • Creative Cloud
  • Creative Suite
  • Digital Marketing Suite
  • Digital Publishing Suite
  • Elements
  • Mobile Apps
  • Photoshop
  • Touch Apps
  • Student and Teacher Editions

Solutions

  • Digital marketing
  • Digital media
  • Web Experience Management

Industries

  • Education
  • Financial services
  • Government

Help

  • Product help centers
  • Orders and returns
  • Downloading and installing
  • My Adobe

Learning

  • Adobe Developer Connection
  • Adobe TV
  • Training and certification
  • Forums
  • Design Center

Ways to buy

  • For personal and home office
  • For students, educators, and staff
  • For small and medium businesses
  • For businesses, schools, and government
  • Special offers

Downloads

  • Adobe Reader
  • Adobe Flash Player
  • Adobe AIR
  • Adobe Shockwave Player

Company

  • News room
  • Partner programs
  • Corporate social responsibility
  • Career opportunities
  • Investor Relations
  • Events
  • Legal
  • Security
  • Contact Adobe
Choose your region United States (Change)
Choose your region Close

North America

Europe, Middle East and Africa

Asia Pacific

  • Canada - English
  • Canada - Français
  • Latinoamérica
  • México
  • United States

South America

  • Brasil
  • Africa - English
  • Österreich - Deutsch
  • Belgium - English
  • Belgique - Français
  • België - Nederlands
  • България
  • Hrvatska
  • Česká republika
  • Danmark
  • Eastern Europe - English
  • Eesti
  • Suomi
  • France
  • Deutschland
  • Magyarország
  • Ireland
  • Israel - English
  • ישראל - עברית
  • Italia
  • Latvija
  • Lietuva
  • Luxembourg - Deutsch
  • Luxembourg - English
  • Luxembourg - Français
  • الشرق الأوسط وشمال أفريقيا - اللغة العربية
  • Middle East and North Africa - English
  • Moyen-Orient et Afrique du Nord - Français
  • Nederland
  • Norge
  • Polska
  • Portugal
  • România
  • Россия
  • Srbija
  • Slovensko
  • Slovenija
  • España
  • Sverige
  • Schweiz - Deutsch
  • Suisse - Français
  • Svizzera - Italiano
  • Türkiye
  • Україна
  • United Kingdom
  • Australia
  • 中国
  • 中國香港特別行政區
  • Hong Kong S.A.R. of China
  • India - English
  • 日本
  • 한국
  • New Zealand
  • 台灣

Southeast Asia

  • Includes Indonesia, Malaysia, Philippines, Singapore, Thailand, and Vietnam - English

Copyright © 2012 Adobe Systems Incorporated. All rights reserved.

Terms of Use | Privacy Policy and Cookies (Updated)

Ad Choices

Reviewed by TRUSTe: site privacy statement