Great place to learn JSF in a virtual world! More Testimonials »

FlexUnit Training

Delivery Options

Class Description

Class Overview

In this FlexUnit Training class, students learn to write unit tests for their Flex applications to make sure the individual components of these applications work independently. This allows developers to continually refactor and improve their applications while making sure that their changes to one component don't break other pieces of the application.

Class Goals

  • Learn testing terms and terminology.
  • Understand FlexUnit's capabilities.
  • Learn to develop static tests in FlexUnit.
  • Learn to work with the Test Fixture in FlexUnit.
  • Learn to using suites in FlexUnit.
  • Understand FlexUnit Theories.
  • Learn to load external data.
  • Learn to create a test with mock objects.
  • Learn to create Parameterized Tests in FlexUnit.
  • Learn to run tests from different versions.
  • Learn to work with FlexUnit's UIComponents.
  • Learn to create and maintain testable code.

Class Outline

  1. Introduction to FlexUnit 4.1
    1. Understanding why we test automatically
    2. Understanding the relationship between FlexUnit .9, Fluint and FlexUnit, the major Flex-based unit testing frameworks
  2. Overview of testing terms and terminology
    1. Test Types
      1. Unit Testing
      2. Integration Testing
      3. Functional Testing
    2. Metadata
    3. Testing Framework
    4. Test Fixture
    5. Test
    6. Test Case
    7. Test Suite
  3. FlexUnit Capabilities
    1. Integration Points
      1. Flash Builder
      2. CI Systems
    2. Extensibility
      1. Runners
      2. Rules
    3. Integration with other frameworks
    4. Provided Runners
  4. FlexUnit Basics
    1. Creating your first test
      1. Creating a test case
      2. Naming your tests
      3. Decorating with metadata
    2. Examining a passing test
    3. Performing basic assertions
    4. Examining a failed test
  5. Developing Static Tests in FlexUnit
    1. Understanding multiple assertions
    2. Ignoring a Test
    3. Hamcrest
      1. Understanding Hamcrest Matchers
      2. Using assertThat()
      3. Using closeTo
    4. Exceptions
      1. Understanding the difference between failures and errors
      2. Expecting an exception
  6. Working with the Test Fixture in FlexUnit
    1. Setting up a fixture
      1. Understanding test case construction and method execution
      2. Learning to use Before and After
        1. Multiple methods
        2. Inherited methods
      3. Understanding BeforeClass and AfterClass
    2. Refactoring to remove duplication
    3. Using Before as an indication of cohesion
    4. The importance of cleaning up the fixture
  7. Using Suites in FlexUnit
    1. Creating a Suite
    2. Understanding the RunWith metadata
    3. Refactoring test cases within suites
    4. Understanding hierarchy and test result reporting
    5. Discuss directory structure and approach for new projects
      1. Dot path mirroring
  8. FlexUnit Theories
    1. Understand the use for data points
    2. Understanding triangulation of test cases
    3. Creating a theory
      1. Using the RunWith metadata
      2. Using the Theory metadata
    4. Creating data points
      1. Using ArrayElementType
      2. Understanding DataPoint versus DataPoints
      3. Using functions and static vars
      4. Discuss external data
    5. Understanding assumptions
    6. Understanding the theory success and failure model
    7. Using complex objects with theories
    8. Using the constructor of the TestCase
  9. External Data
    1. Understanding asynchronous loading
    2. Loading external data
      1. Creating a loader
      2. Specifying a loader for the data
    3. Discussion on data typing and conversion
  10. FlexUnit Mock Classes
    1. Understanding the use case for mocks
    2. Examining available mocking frameworks
    3. Working with a mock
      1. Setting expectations
      2. Verification
      3. Strict versus nice
    4. Using the Mockolate Rule
      1. Understanding the new metadata
        1. Rule
        2. Mock
      2. Understanding how Rules are executed
      3. Mocking a UIComponent
    5. Creating a test with mock objects
    6. Individual verifications
  11. Parameterized Tests in FlexUnit
    1. Use case differences from theories
    2. Declaring simple data for parameterization
    3. Types of Parameterized Tests
      1. JUnit
      2. TestNG
    4. Working with complex objects
    5. Using external data
  12. Running tests from different versions
    1. Running a FlexUnit .9 test
    2. Running a Fluint 1 test
    3. Understanding a runner
    4. Understanding how FlexUnit 4.x can work with multiple runners
  13. Working with Asynchronous operations in FlexUnit
    1. Understanding the need for async
    2. Introduction to the available async methods
    3. Understanding error handling with async
    4. Event based synchronous versus asynchronous
    5. Chaining async operations
  14. UIComponents
    1. Understanding how the display list interacts with UIComponents
    2. Understanding inherent asynchronous behavior
    3. Understanding the UI Facade
      1. Available facade methods
      2. Adding a component to the display list
      3. Removing a component from the display list
    4. Waiting for a component to reach its ready state before testing
  15. Creating Testable Code
    1. Architectural rules for testing
    2. Why highly cohesive code tends to test more easily
    3. Why loosely coupled code can be tested less painfully
    4. Refactoring an un-testable piece of code to something testable
    5. Creating tests for legacy code
  16. Allowing your tests to function with continuous integration
    1. Understanding continuous integration
    2. Examining a build script
    3. Hudson
      1. Understanding Hudson
      2. Creating a Hudson task for your tests
    4. Understanding listeners
      1. Using the CIListener
    5. Failure and Success reporting options
  17. Conclusion
    1. Topics for further learning
      1. Code Coverage
      2. Static Code Analysis
    2. Beyond Unit Testing
      1. Integration Testing
        1. Fluint
        2. More Fluent
      2. Functional Testing
        1. FlexMonkey
        2. RIATest
        3. QTP

Class Materials

Each student in our Live Online and our Onsite classes receives a comprehensive set of materials, including course notes and all the class examples.

Class Prerequisites

Experience in the following areas is required:

  • Flex

Courses that can help you meet these prerequisites:

Technical Requirements

Our computer technical requirements and setup process is easy, with support just a click away.

Client Success
  1. Independent Survey
  2. Client List
  3. Testimonials
Join The Team
  1. Learn how you can become a Webucator Trainer
  2. Career Opportunities
Locations
Watch 3-minute Demo Video
of Live Online Training:
Learn the benefits of online training with Webucator

Free Webinars

A Crash Course in CSS

Wed, 3/21 1:00 PM EST

Project Management Institute Partner

Webucator is a Registered Education Provider (R.E.P.) approved by PMI to issue professional development units (PDUs) for our training courses.

© Webucator, Inc. All rights reserved. | Toll Free: 1-877-932-8228 | From outside the USA: 315-849-2724| Fax: 315-849-2723