UIListener Not Found, TestRunnerBase Errors, and Other Resource Issues

The UIListener is not in the core project, it is in the UIListener project, so unless you have that one as well, you will not have the UIListener.

TestRunnerBase isn't something written for FlexUnit 4. It is an adaption of a FlexUnit 1 concept to give people a familiar environment as a default test runner. The goal is to eventually write a new one for FlexUnit 4 but the priorities have been directed towards features and IDE integration.

In many situations, the flexui namespace in these error prone projects is pointing to an older version of the TestRunnerBase buried somewhere in the FlexUnit .9 project. We include FlexUnit .9 in its entirety for compatibility reasons, but it means that you can sometimes reference older classes. The appropriate namespace should be:

http://www.adobe.com/2009/flexUnitUIRunner

Sample application:

<?xml version="1.0" encoding="utf-8"?>
<s:Application
xmlns:fx="http://ns.adobe.com/mxml/2009" 
xmlns:s="library://ns.adobe.com/flex/spark" 
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:adobe="http://www.adobe.com/2009/flexUnitUIRunner" 
creationComplete="runMe()">

  <mx:Script>
      <![CDATA[

    import org.flexunit.listeners.UIListener;
    import compilationSuite.SuitesToRun;
    import org.flexunit.runner.FlexUnitCore;

    private var core:FlexUnitCore;

    public function runMe():void {
      core = new FlexUnitCore();
      core.addListener( uiListener );
      core.run( compilationSuite.SuitesToRun );
      }

    ]]>
  </mx:Script>

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

If that doesn't work, then you are missing the FlexUnit4UIListener.swc and your namespace is probably set differently. You can download the full set of libraries at flexunit.org