6 Replies Latest reply on Nov 19, 2010 9:17 AM by mlabriola

    TestRunnerBase compile error FX3 FU4

    Roy.P. Level 1

      I am getting a compile error.
      Using FlexBuilder3 (3.4.1 SDK).
      FlexUnit 4
      I have the 5 swc files in my project's lib folder.

      Here is my code:

      <?xml version="1.0" encoding="utf-8"?>
      <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml"
                              layout="absolute" creationComplete="init()">
                  import flexUnitTests.TestSuite;
                  import org.flexunit.runner.FlexUnitCore;
                  import org.flexunit.listeners.UIListener;

                  private var core:FlexUnitCore;
                  public function init():void {
                      core = new FlexUnitCore();
                      core.addListener(new UIListener(uiListener));

          <adobe:TestRunnerBase id="uiListener" width="100%" height="100%"  />

      This is the error:  Could not resolve <adobe:TestRunnerBase> to a component implementation.

      (this question was also posted on an existing thread)

      Please advise.
      Roy P.

        • 1. Re: TestRunnerBase compile error FX3 FU4
          mlabriola Level 4

          Which swc files do you have in your build path?


          Also, make sure you take a look at this:


          https://flexunit.tenderapp.com/faqs/known-issues/uilistener-not-found-testrunnerbase-error s-and-other-resource-issues



          • 2. Re: TestRunnerBase compile error FX3 FU4
            Roy.P. Level 1


            Thanks for the response.


            I must have missed the step that said to include the .swc in the build path.  I have it in my project/libs folder and have updated the build path to have that folder.  The specific .swc I am using is flexunit-4.0.0.swc.  Do I need another?


            When I include other .swc files in the libs directory (e.g., flexunit-uilistener-4.0.0.swc), I get other compile errors.  When I have only flexunit-4.0.0.swc, I get the compile error noted in my original posting.


            I looked at that web site (and a host of others) and have not been able to resolve my compile error.


            Please advise.

            Roy P.

            • 3. Re: TestRunnerBase compile error FX3 FU4
              mlabriola Level 4



              First thing to check. Since you are using the 3.x SDK, are you using a 3.x version of FlexUnit ore one built for 4.


              If you want to double check, you can download the latest 3.5 (which will work fine with 3.4 as well) build from here.




              I would consider getting rid of the libraries you have, puting these in place so we know we have a clean starting point and then I can help more.



              • 4. Re: TestRunnerBase compile error FX3 FU4
                Roy.P. Level 1

                Hi Mike,


                I split things up a bit and added two .swc files to my library path.  I get a clean build now.


                Do you happen to have a good example of how to implement FlexUnit4 into a FlexBuilder 3.x SDK?  I've looked on the 'net and it looks there are about 15000 examples, but most of them are dated (later 2008 / early 2009).  An example of how to use FU4 in FX3 will be helpful (or even FU3.5 with FX3.4).  I am unable to find any examples that I can use for those.


                Also, we are contemplating going to FlashBuilder4.1 and may also need a good example of implementing FlexUnit4 in that SDK as well.  (I have found some tutorials, but I have some confusion on the implementation as described therein.)


                As always your assistance is appreciated.


                Roy P.

                • 5. Re: TestRunnerBase compile error FX3 FU4
                  Roy.P. Level 1

                  I found a good example of how to use FlexUnit4 with FlexBuilder3 at this location: http://sberka.blogspot.com/2009/08/using-flexunit-4-with-flex-3-sample.html.


                  Also, something that is made in passing (at least it looked to be hidden in some set up notes) is the need to make sure you include the .swc files for FlexUnit4 in your library path (project settings).  For ease of use, it may be helpful to have those .swc files in a central project so it can be included in all relevant applications.


                  The question has been answered, but not directly by anyone else.  I had to look and scour for good and relevant (and easy to understand) examples of how to use FlexUnit4 with FlexBuilder3.


                  FlashBuilder4 is a bit easier to use with FlexUnit4, but there are some significant changes between FlexBuilder3 and FlashBuilder4 that can trip you up.  The learning curve of going from Fx3 to Fb4 is not insurmountable and the benefits of doing so may be very much worthwhile to pursue.


                  Roy P.

                  • 6. Re: TestRunnerBase compile error FX3 FU4
                    mlabriola Level 4



                    Flexunit is an open source project maintained entirely by volunteers, so feel free to add anything you would like about setting this up in FlexBuilder here: