Automation testing of Flex applications using QTP has been there for a long time But the FlashBuilder 4 (Beta version ) now also provides you with a way to Automate AIR applications as well!!Adobe now provides you with the QTP-AIR plugin along with the QTP-Flex plugin.
How to make your AIR application automatable.
To make your AIR app automatable you will need to statically compile your AIR app with the automation swcs.
Steps to do this:
- Select the AIR project within Flash Builder and go to Project->Properties->flex Compiler and add this
- -locale en_US -include-libraries “[flashbuilder path]\sdks\4.0.0\frameworks\libs\automation\automation.swc” “[flashbuilder path]\sdks\4.0.0\frameworks\libs\automation\automation_air.swc” “[flashbuilder path]\sdks\4.0.0\frameworks\libs\automation\automation_dmv.swc” “[flashbuilder path]\sdks\4.0.0\frameworks\libs\automation\automation_agent.swc” “[flashbuilder path]\sdks\4.0.0\frameworks\libs\automation\qtp_air.swc”
- Click on Ok
- Go To Project->Clean
- Ensure that the Flex 4Plugin for QTP has been installed on top of QTP and the AIR add in has been selected in the QTP Add-in manager screen.
- Start QTP.
- Run the AIR app.
- If you get an alert message saying “Successfully connected to QTP ” .That means you are ready to go!!