4 Replies Latest reply on Jun 29, 2010 2:32 AM by Paul Feakins

    FlexUnit 4.1 Beta 1 turnkey project doesn't build

    msakrejda Level 4

      Getting the following error after setting up the project:

       

       

      Could not resolve <flexUnitUIRunner:TestRunnerBase> to a component implementation.    flexunit-test/src    FlexUnit4Turnkey.mxml    line 86

       

      Any ideas? Clearly, things have moved around quite a bit (always a fun thing to push out in a minor release), but I can't figure out what I should be using instead of TestRunnerBase.

        • 1. Re: FlexUnit 4.1 Beta 1 turnkey project doesn't build
          msakrejda Level 4

          Ok, so it seems it's just a namespace issue: if I add

           

            xmlns:flexui="org.flexunit.flexui.*"

           

          to the root tag (and use the 'flexui' prefix in mxml), that seems to fix it. I'm not sure why the flexUnitUIRunner namespace declaration doesn't work (I imagine something to do with the build process, but I don't quite understand namespaces that aren't baed on packages). At the moment, I'm still getting errors:


          1046: Type was not found or was not a compile-time constant: [mx.binding]::IWatcherSetupUtil2.

           

          This looks like a Flex 4 dependency. I'm downloading the Flex 4 SDK to try it out, but can I not run FlexUnit 4.1 tests with a Flex 3 SDK? This worked fine for 4.0, but I really, really want the test dataProvider feature from 4.1...

          • 2. Re: FlexUnit 4.1 Beta 1 turnkey project doesn't build
            mlabriola Level 4

            The FlexUnit 4.1 library itself doesn't have any Flex 4 specific dependencies so you can absolutely using the dataProvider feature in Flex 3.x ... in fact, I used 3.x to develop it. The turnkey project is usually offered for either 4.x or 3.x as different downloads, so do make sure you grabbed the correct one first.

             

            Since the FlexUnit library does have convenience methods for things like Binding, it means that we do need to offer separate builds (or let you build it yourself) for the different SDKs as Adobe has changed some of those interface between versions. However, I guess the point is that, so long as you have the correct set, you can use FlexUnit 4.1 in every version of Flex from 2.x forward.

             

            Cheers,

            Mike

            • 3. Re: FlexUnit 4.1 Beta 1 turnkey project doesn't build
              msakrejda Level 4

              Ok, thanks. That's great to hear. I just grabbed the turnkey project from the 4.1 beta release--I guess that was a 4.0 SDK build. I'll try to hunt down the correct version tonight.

              • 4. Re: FlexUnit 4.1 Beta 1 turnkey project doesn't build
                Paul Feakins

                Hi msakrejda,

                 

                I had the same problem initially, I fixed it by using the swcs from FlexUnit 4.0 (i.e. not the beta):

                http://www.flexunit.org/?page_id=14

                 

                From what I could see the turnkey project was only in the beta download so to get this working with the Flex 4 SDK, use the turnkey project from the beta, but in the libs folder, clear out everything except "hamcrest-1.0.2.swc". Then from your 4.0 download, copy "flexunit-4.0.0.swc" and "flexunit-uilistener-4.0.0.swc" in to the libs folder in your turnkey project.

                 

                That worked first time for me (apart from 2 CSS warnings which can be safely ignored).

                 

                Hope that helps.

                Paul.