1 Reply Latest reply on Feb 8, 2013 10:32 AM by paulhart83

    Flash Builder 4.7 Unit Tests for Mobile Devices

    paulhart83 Level 1

      I am trying to setup a simple unit test using Flash Builder 4.7. I created a Test Suite and a Test Case class.

       

      Using the menu, I select Run > Run. I see options to select which Test Case / Methods I'd like to run.

       

      But the strange thing is, next I have to select a launch configuration. I'd assume it would just launch in some console window and give me test results. I did what I could and have it setup to run on the AIR simulator for a XOOM device. Nothing happens I just see a blank screen with a blank bar at the top.

       

      I've also tried right clicking the project and choosing execute flexunit tests. My FlexUnit Resulst still says 0/0.

       

      What is the launch configuration I need to use to execute the test cases and get the results?

        • 1. Re: Flash Builder 4.7 Unit Tests for Mobile Devices
          paulhart83 Level 1

          I solved it! After looking at example code on google, I realized that the s:ViewNavigatorApplication was missing two key options:

           

          firstView="flexunit.flexui.FlexUnitTestRunnerUIMobile"

          firstViewData="{getFirstViewData()}"

           

          Thankfully I was able to derive this. It makes 0 since to me why this wouldn't be added to the automatically generated mxml file but the functions it utalizes does. This to me seems like a defect. If you'd like people to use automatically generated files, make sure they are functional.

           

          Thanks