سؤال

What are the steps to change your default suite when running unit tests in Flash Builder 4 with PureMVC?

هل كانت مفيدة؟

المحلول 2

In order to change or add to the test suites, I had to change the test suite in the listener for the startup event on the mediator for the application component.

override public function handleNotification( note:INotification ):void
{
    switch ( note.getName() )
    {
        case NotificationConstants.STARTUP_SUCCESS:

            flexUnitApplication.testRunner.runWithFlexUnit4Runner(currentRunTestSuite(), "MyTests");
            break;
    }
}

private function currentRunTestSuite():Array
{
    var testsToRun:Array = new Array();
    testsToRun.push(MyTestSuite);
    return testsToRun;
}

نصائح أخرى

When you create a new test case or a new test suite you can select whether to use FlexUnit4 or FlexUnit1 from the top of the menu. I looked around and didn't see any way to pre-select one or the other a priori.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top