Thursday, February 3, 2011

I am testing Flex 4.1 application, are you...?

As flex 4.1 SDK is available now , so are the Flex 4.1 applications. I have tried to automate them and test using Rational Functional Tester 8.2. Just follow the below steps and you are ready to test them in no time.

1. First, make sure that you have Rational Functional Tester installed on your machine (RFT version 8.2 or later).

2. Now download the Flex 4.1 SDK (flex_sdk_4.1.0.16076.zip) from adobe download site. I installed the sdk from this url :
http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4

3. Unzip the file and you have the SDK set on your system. I rename it to flex_sdk_4.1.

4. Now go to your flex project in flex builder and go to Project->Properties->Flex Compiler and in the additional compiler arguments text box enter replacing Flex4.1SDK_root with your install directory : -include-libraries “Flex4.1SDK_root\flex_sdk_4.1\frameworks\libs\automation\automation.swc” “Flex4.1SDK_root\flex_sdk_4.1\frameworks\libs\automation\automation_agent.swc” “Flex4.1SDK_root\flex_sdk_4.1\frameworks\libs\automation\automation_dmv.swc” “RFT_install_directory\bin\rftFlex4.0.swc” “RFT_install_directory\bin\rftProp_Flex4.0.swc”

I have unzipped the flex_sdk_4.1.0.16076.zip SDk into C:\Program Files\Adobe directory and renamed it to flex_sdk_4.1. Hence the Flex4.1SDK_root is C:\Program Files\Adobe
And RFT_install_directory is "C:\Program Files\IBM\SDP\FunctionalTester"

5. Click on Apply and OK and go to Project->clean and clean the corresponding project. This will generate an swf file and html page corresponding to the Flex mxml application.

6. Now open the application configuration tool in RFT and add the html page generated in above step to the configured application list as Flex application.

7. Now run the configured application and start recording with RFT. The application is set to be tested.

Note:
1. RFT supports testing of Halo components in Flex 4.0/4.1 and not the spark controls.
2. Make sure the browser is enabled before you start testing the Flex application with RFT
3. Flex Builder 4.0 install contains Flex 4.0 SDK. You can manually download the Flex 4.1 SDK from above url or use the Flex Builder's update for 4.1 SDK.

No comments:

Post a Comment