Flash Builder:更改单元测试的默认套件?

发布于 2024-10-06 07:22:59 字数 57 浏览 0 评论 0原文

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

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

疾风者 2024-10-13 07:22:59

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

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.

维持三分热 2024-10-13 07:22:59

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

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

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;
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文