安装设备单元测试框架
我已经在设备中安装了 Framework2.0,我已经为 smartDevice 应用程序创建了一个单元测试项目,现在要测试这个项目,我需要在机器中安装设备单元测试框架。 http://msdn.microsoft.com/en-us/library/bb545998。 aspx
这里我想知道Device Unit Test Framework是否是独立分发的。我试图找出答案,但没有成功。我不同意安装完整的 .net Compact Framework 3.5 只是为了运行单元测试项目,因为我的应用程序(为其创建单元测试项目)仅使用 .net Framework 2.0。
有谁可以告诉我吗?如VS2005提供了DEVICES的单元测试功能。
I have Framework2.0 already installed in device, I have created a unit Test project for the smartDevice application, now to test this project I need to have Device Unit Test Framework installed in the machine.
http://msdn.microsoft.com/en-us/library/bb545998.aspx
Here I want to know if Device Unit Test Framework is distributed independently. I tried to find it out but no luck. I am not fine with installing complete .net Compact Framework 3.5 just to run the unit test project because my application ( for which unit test project is created) is using .net framework 2.0 only.
Can any body tell me. If VS2005 provides Unit testing functionality of DEVICES.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
设备单元测试框架还支持 .NET Compact Framework 2.0,因此您可以放心使用。
请阅读这篇文章,了解如何配置和运行单元测试在您的设备上。
The Device Unit Test Framework also supports .NET Compact Framework 2.0, so you're fine there.
Please read this article to see how to configure and run the unit tests on your device.
我做了很多紧凑框架开发,我建议使用智能设备单元测试的替代方案。
重构您的代码,使您的 UI 只是一个视图。 (即它除了调用其他类之外什么都不做。)然后将非 UI 类置于单元测试下。 (只是正常的单元测试。)
当您第一次创建正常的单元测试项目时,Visual Studio 会给您一个警告,但之后就很顺利了。
这样做有 3 个原因:
现在的缺点是:
虽然缺点很明显,但单元测试并不能替代“真实”测试,“真实”测试可以快速发现该缺点可能遗漏的任何问题。
I do a lot of Compact Framework development and I would suggest an alternative to use the Smart Device Unit Testing.
Refactor your code so that your UI is just a View. (Ie it does nothing but call other classes.) Then put your non-UI classes under Unit test. (Just normal unit tests.)
Visual Studio will give you a warning when you first create the normal unit test project, but after that it is smooth sailing.
There are 3 reasons for doing this:
Now the drawback:
While the drawback is significant, unit tests are not a substitute for "real" testing which would quickly catch any issues that would be missed by that drawback.