【问题标题】:Flash Builder: Change default suite for unit tests?Flash Builder:更改单元测试的默认套件?
【发布时间】:2011-05-21 14:42:14
【问题描述】:

在使用 PureMVC 的 Flash Builder 4 中运行单元测试时更改默认套件的步骤是什么?

【问题讨论】:

    标签: apache-flex unit-testing flash-builder puremvc test-suite


    【解决方案1】:

    当您创建新的测试用例或新的测试套件时,您可以从菜单顶部选择是使用 FlexUnit4 还是 FlexUnit1。我环顾四周,没有看到任何预先选择一个或另一个的方法。

    【讨论】:

      【解决方案2】:

      为了更改或添加测试套件,我必须更改侦听器中的测试套件,以便在应用程序组件的调解器上更改启动事件。

      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;
      }
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2010-11-30
        • 2019-02-06
        • 1970-01-01
        • 2023-03-21
        • 2016-10-15
        • 1970-01-01
        • 1970-01-01
        • 2011-07-07
        相关资源
        最近更新 更多