Skip navigation
Currently Being Moderated

<flexunit:TestRunnerBase >problem

Mar 16, 2010 11:47 PM

This is the  code I have written for testing in flexcover

---------------------------------------------------------------------- --------

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
    xmlns:flexunit="http://www.adobe.com/2009/flexUnitUIRunner"
   
               
                creationComplete="runMe()" >

 

    <mx:Script>
        <![CDATA[
            import mouli.UIListener;
     import myComponents.Greeter;         
    
     import org.flexunit.runner.FlexUnitCore;
     import org.flexunit.listeners.UIListener;
     //import flexunit.runner.BaseTestRunner;
     //import flexunit.flexui.TestRunnerBase;
     //import com.adobe.cairngorm.control.FrontController;
     private var core:FlexUnitCore;

 

     public function runMe():void {
          core = new FlexUnitCore();
          core.addListener(new UIListener(uiListener));
          core.run( myComponents.Greeter );
     }
        ]]>
    </mx:Script>
   
<flexunit:BaseTestRunner id="uiListener" width="100%" height="100%" />
</mx:Application>

 

---------------------------------------------------------------------- -----------

And the error is at  line 26 .. and it is like this

 

Could not resolve  <flexunit:TestRunnerBase> to a component implementation.         TestFlexcover/src           TestProject.mxml            line 26   1268801906106  25

 

i am breaking my head on this please help me

 

 
Replies
  • Currently Being Moderated
    Mar 17, 2010 8:26 AM   in reply to ursaditya

    Change the MXML in your file to this instead

     

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

     

    Just TestRunnerBase versus BaseTestRunner. Just as an FYI, what is really happening here is that we are instantiating the UI which was originally written for FlexUnit .9. It is then wrapper in our UIListener, which you are doing correctly, to adapt it. Then it is used as a listener.

     

    In the next release or so of FlexUnit this will become easier as this UI is phased out in favor of a simpler model.

     

    Mike

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 18, 2010 2:01 AM   in reply to ursaditya

    I still have the same problem. "Could not resolve <...TestRunnerBase>. Downloaded the FlexUnit4TurnkeyRC1, running it through FlashDevelop unsing flex framework 4..0.0. Some help please.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 19, 2010 8:37 PM   in reply to showboat44

    Post your code so we can help you.

     

    I am guessing that your namespace on the top of the file either doesn't point to the correct one for the library or isn't matching the tag but I won't know until I see it.

     

    Mike

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 22, 2010 12:33 AM   in reply to Michael Labriola

    I have downloaded the FlexUnit Turnkey RC1 and using it as is, without any changes. I run into a lot of problems, mainly the one stated above. However, I have been able to get it to compile occationally, but then i get another problem. Identifier uiListener is used more than once. I change the name of it and it compiles again, but the problem returns. Please shed some light.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 15, 2010 8:50 AM   in reply to ursaditya

    Sorry, but I don't know enough about PMD to help you

     
    |
    Mark as:
  • Currently Being Moderated
    May 29, 2010 12:57 AM   in reply to ursaditya

    Thanks you very much

     

     

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 17, 2010 2:23 PM   in reply to Michael Labriola

    I am also getting this same error.  Using FlexBuilder3 (3.4.1 SDK).

     

    Here is my code:

    <?xml version="1.0" encoding="utf-8"?>
    <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml"
                            xmlns:adobe="http://www.adobe.com/2009/flexUnitUIRunner"
                            layout="absolute" creationComplete="init()">
        <mx:Script>
            <![CDATA[
                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));
                    core.run(TestSuite.ampTestSuite);
                }

            ]]>
        </mx:Script>
        <adobe:TestRunnerBase id="uiListener" width="100%" height="100%"  />
    </mx:WindowedApplication>

     

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

     

    Roy P.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 28, 2010 6:13 PM   in reply to ursaditya

    to ursaditya :

    Compiler can't resolve namespace

    you need change it from  "http://www.adobe.com/2009/flexUnitUIRunner"  to  "org.flexunit.flexui.*"

    eg find in the begining of your code

    xmlns:flexunit="http://www.adobe.com/2009/flexUnitUIRunner"

    and replece with

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

     

     

    to Michael Labriola;

    if I am correct you Adobe Evangelist and write article flexUnit4 in 360 seconds - shame on you that you can't resolve this problem.

    But thanks anyway for article!

    I really don't like flash/flex documentation since Adobe bye macromedia.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 28, 2010 6:17 PM   in reply to PhantomGAD

    First, if you note above I did suggest a namespace problem. Second, if you are using this namespace, what it actually means is that you somehow have a library compiled without the proper namespace or things would have worked as expected. Third, I didn't just write the article, I wrote all of FlexUnit.

     

    Mike

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 28, 2010 6:20 PM   in reply to Michael Labriola

    Also, FlexUnit isn't an Adobe project. It is a community project run and documented purely by volunteers, so please feel free to volunteer to help fix any documentation you feel lacking.

     

    Also, as was noted on some of the other posts with the same question, you can take a look here for some additional knowledge base information:

     

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

     

    Mike

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points