简体   繁体   English

FlashDevelop中良好的单元测试选项

[英]Good Unit Testing Options in FlashDevelop

I'm new to AS3 and Flex, but I am creating a mobile app with them in FlashDevelop. 我是AS3和Flex的新手,但是我正在FlashDevelop中使用它们创建一个移动应用程序。 I want to add some unit tests, but I can't find any really good frameworks or documentation on it. 我想添加一些单元测试,但是找不到任何非常好的框架或文档。 I saw a little bit on FlexUnit and AsUnit, but both seem to be a few years old, and there isn't much documentation on using them in FlashDevelop. 我在FlexUnit和AsUnit上看到了一些内容,但是它们似乎都已经使用了几年了,并且在FlashDevelop中没有太多关于使用它们的文档。

Is there a good framework I can use for unit testing here? 这里有一个可以用于单元测试的好的框架吗? Even if I can't test the UI layer, I'd like to at least make sure my backend functions work correctly. 即使我无法测试UI层,我也至少要确保我的后端功能正常工作。

If you are testing backend functions, then you generally want to use the testing framework of whatever backend you are using. 如果要测试后端功能,则通常希望使用所使用的任何后端的测试框架。 If you want Flex to test your backend functions, then you aren't Unit Testing, you are Integration Testing. 如果您想让Flex测试您的后端功能,那么您就不是单元测试,而是集成测试。 While FlexUnit seems old, it still performs well at serving its purpose. 尽管FlexUnit看起来很旧,但在实现其目标方面仍然表现良好。 The usage of FlexUnit should be independent of your IDE, you may just have to do more typing. FlexUnit的用法应独立于您的IDE,您可能只需要进行更多键入即可。

You can try to use the Flexunit4.0 for testing the business logic on the client side mixing it with the Mockito. 您可以尝试使用Flexunit4.0在客户端将其与Mockito混合使用以测试业务逻辑。 None of these actually support testing the UI. 这些都不实际支持测试UI。

i've never tried to test the backend services with the Unit testing because of the authentication issues, but we created another testing UI for testing the services, This UI has a tons of screens, each screen to test different services. 由于身份验证问题,我从未尝试过使用单元测试来测试后端服务,但是我们创建了另一个用于测试服务的测试UI,该UI有很多屏幕,每个屏幕用于测试不同的服务。

I've seen that there is a ServiceBrowser for amfphp, i'm not sure if this can be used for Java or other platforms. 我已经看到有一个用于amfphp的ServiceBrowser,我不确定它是否可以用于Java或其他平台。

Other ways of testing the UI is by automation testing, use flexmonkey, selenium for that. 测试UI的其他方法是通过自动化测试,为此使用flexmonkey,selenium。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM