Skip navigation
Currently Being Moderated

Implicit coercion of a value of type flexunit.flexui:TestRunnerBase to an unrelated type org.flexunit.runner:IRunner.

Sep 16, 2009 4:53 AM

Hello all,


any idea for this error ?


Severity and Description    Path    Resource    Location    Creation Time    Id
1067: Implicit coercion of a value of type flexunit.flexui:TestRunnerBase to an unrelated type org.flexunit.runner:IRunner.    QuizzGame/src    QuizzTest.mxml    line 21    1253101842782    7688

in my project lib :





I created the QuizzTest.mxml    file and impossible to compile due to the error specified before :

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx=""
            import org.flexunit.runner.notification.IRunListener;
            import org.flexunit.runner.FlexUnitCore;


            import flexunit.framework.TestSuite;
            private var flexUnitCore:FlexUnitCore;


            // Create the test suite and run the tests
            private function onCreationComplete():void
                flexUnitCore=new FlexUnitCore();
                //This run statements executes the unit tests for the FlexUnit4 framework
    <flexunit:TestRunnerBase id="testRunner"




</mx:Application >

  • Currently Being Moderated
    Sep 16, 2009 7:07 AM   in reply to mouais666



    first, remove this line:




    second, there is likely some confusion around the naming here which we need to address. The TestRunnerBase is a left over name from FlexUnit1 that we should really change. It is just a UI at this point, it doesn't actually have anything to do with running tests. But your code looks a bit like a combination of FlexUnit .9 and FlexUnit 4, so be careful there. I would really recommend grabbing the FlexUnit4 turnkey project and ensuring you are using all of the libraries from there:


    Below is an example of the corrected syntax from the FlexUnit 4 turnkey project. You will not a few difference, first, there is no call to runRunner, the UI listens to the FlexUnitCore which does all of the running. Also, to reinforce this the TestRunnerBase is named UIListener (which was my first clue that there were somethings copied from a FlexUnit1 project). You can dowload the turnkey project completely from


    core = new FlexUnitCore();
    core.addListener( new UIListener( uiListener )); whatever you want );

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


    Mark as:
  • Currently Being Moderated
    Aug 18, 2010 4:15 PM   in reply to Michael Labriola

    oh thanks I was looking for this, removing the firs line and it's working.


    thanks so much

    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