的FlexUnit用在Flex Builder 3纯ActionScript项目 [英] flexunit with pure ActionScript project in Flex Builder 3

查看:144
本文介绍了的FlexUnit用在Flex Builder 3纯ActionScript项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果您创建在Flex Builder 3中纯ActionScript项目,并希望使用的FlexUnit做单元测试,什么是最好的选择吗?

内置的Flex Builder将拒绝建立包含TestRunnerBase组件的MXML文件,因为它是一个纯ActionScript项目(没有弯曲允许)。这是不可能的,在项目设置MXML文件添加到ActionScript应用程序列表中。

现在我可以看到两个选项,无论是不可取的。

  1. 单元测试MXML文件添加到项目,并创建一个外部工具设置建立并运行它。这是我现在正服下的方法,它工作正常,只是交互式调试是不可能的。
  2. 只是为了测试MXML文件中创建一个新的Flex项目,并添加主项目的src目录中生成选项额外的源代码目录。我不喜欢这种方式,因为它要求我保持在一个单独的目录树中的MXML文件来自其他所有源文件除了保持两个项目的丑陋。
解决方案

总是有 ASUnit

If you create a pure ActionScript project in Flex Builder 3 and want to do unit testing using flexunit, what is the best option?

The built-in Flex builder will refuse to build the mxml file containing the TestRunnerBase component as it is a pure ActionScript project (no Flex allowed). It is impossible to add the mxml file to the "ActionScript Applications" list in the project settings.

Right now I can see two options, both undesirable.

  1. Add the unit testing mxml file to the project and create an external tool setup to build and run it. This is the approach I'm taking now, and it works fine, except that interactive debugging is impossible.
  2. Create a new Flex project just for the test mxml file and add the main project's src directory as an additional source directory in the build options. I don't like this approach because it requires that I keep the mxml file in a separate directory tree from all the other source files in addition to the ugliness of maintaining two projects.

解决方案

There's always ASUnit.

这篇关于的FlexUnit用在Flex Builder 3纯ActionScript项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆