Mar 7, 2010 0
Flex Training Course for QA Engineers
VMware requested from me to prepare a Flex course for their QA engineers and here it is – I’m pleased to share with you the first and only (to my knowledge) course especially prepared to train QA engineers in the intricacies of testing Flex application. This course shares some of the material I teach to the software engineers, but the lab exercises are totally different – instead of focusing on building an application, we’ll focus on understanding the Flex technology and how it can be tested in programmatic fashion.
The course is structured in 5 lecture topics and 9 practical labs in the course of which we’ll build an app an explore different aspects of its testing. Each lecture has slides that you can download from here. Each lab will end up with a project that would be uploaded here for future download.
Topic 1 – Overview of Flash and Flex
Topic 2 – Introduction to ActionScript 3 & MXML
Topic 3 – Introduction to Flex Components
Topic 4 – Event Handling
Topic 5 – Remoting Basics
Almost all of the lab projects are based on a sample project prepared especially for the QA course. The sample is available for download. After each lab the current state of the project will also be made available for download.
DOWNLOAD THE COMPLETED PROJECT
The ZIP contains two projects that you need to import – a library project and a regular Flex project.
Each lab covers a set of goals as defined here:
Lab 1 – Project Setup & Getting to Know the Flex Builder
- importing the complete project
- creating a new project
- preparing the directory structure
- adding the entity classes
- writing the Resources-Utility (plain AS3)
- adding the Main-Model (demonstrate both in AS3 and in MXML)
- getting comfortable with DataBinding
Lab 2 – Adding Code Behind and View Components
- adding the Main-View (just MXML)
- adding code behind for handling events (demonstrate both the Script tag, the base class and the source file)
DOWNLOAD DATA BINDING SAMPLES
DOWNLOAD CODE BEHIND PROJECTS
DOWNLOAD CUSTOM UICOMPONENT PROJECT
DOWNLOAD STATES & TRANSITIONS SAMPLE
Lab 3 – Adding and Understanding id’s
Lab 4 – Feeding the List Components with Mock-Up Data
- use data binding to feed the list components
- writing the Resources-Data-Adapter (plain AS3)
- writing the Tree-Data-Adapter (plain AS3)
- introduce the tree component
DOWNLOAD EVENT HANDLING SAMPLE
Lab 5 – Traversing the TreeCheckBox-component
- understanding why using the Automation API is important
- including all needed libraries
- understanding the custom AutomationImpl component
Lab 6 – Adding Custom Method to ExternalInterface and Invoke them through JavaScript
- adding ExternalInterface.addCallback
- invoking through Firebug
FLEX SAMPLES: AUTOMATION API SAMPLE APPLICATIONS
DOWNLOAD THE AUTOMATION API DOCUMENTATION (PDF)
Lab 7 – Invoking the Selenium API through JavaScript and Firebug
- copy the SeleniumFlexAPI.swc to libs
- add -include-libs “../libs/SeleniumFlexAPI.swc” to compiler arguments
- demonstrate document["QAFlexCourseProject"].getFlexProperty(”viewstack”, “selectedIndex”);
- demonstrate document["QAFlexCourseProject"].doFlexProperty(”viewstack.selectedIndex”, 0);
- add a Button to the Test-View which opens an Alert
- demonstrate document["QAFlexCourseProject"].doFlexClick(”seleniumTestButton”, “”);
Lab 8 – Simulating User Actions through Dispatching Events
- demo an attempt of automating user gestures this way
- demonstrate FlexMonkey
