有人成功使用过 NUnitLite 吗?
我最近开始研究 Compact Framework,我想知道是否有人对 VS 2008 之外的单元测试有一些建议。MSTest 还可以,但是调试测试是一场噩梦,测试运行程序太慢了。
我看到 codeplex 上的 NUnitLite 是一个选项,但它看起来不是很活跃; 它也在 NUnit 3.0 的路线图中,但谁知道什么时候会出现。 有人成功了吗?
I've recently started work on the Compact Framework and I was wondering if anyone had some recommendations for unit testing beyond what's in VS 2008. MSTest is ok, but debugging the tests is a nightmare and the test runner is so slow.
I see that NUnitLite on codeplex is an option, but it doesn't look very active; it's also in the roadmap for NUnit 3.0, but who knows when that will come out. Has anyone had any success with it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我们使用 NUnitLite,尽管我认为我们确实必须向其添加一些代码才能使其工作。
我们发现的问题之一是,如果您使用仅存在于 CF 中的平台部分,那么您只能在模拟器或 Windows Mobile 设备上的 NUnitLite 中运行这些测试,这使得很难将测试作为集成的构建过程。 我们通过添加一个新的测试属性来解决这个问题,该属性允许您禁用仅在 CF 上运行的测试(通常这些测试将 p/调用某些仅适用于 Windows Mobile 的 dll)。
We use NUnitLite, although I think we did have had to add some code to it in order for it to work.
One of the problems we found is that if you are using parts of the platform that only exist in CF, then you can only run those tests in NUnitLite on an emulator or Windows Mobile device, which makes it hard to run the tests as part of an integrated build process. We got round this by added a new test attribute allowing you to disable the tests what would only run on the CF (typically these would be p/invoking out to some windows mobile only dll).
我们所做的真正提高效率和质量的方法是针对我们的移动应用程序进行多目标化。 也就是说,只需一点点创造力和一些条件编译标签和自定义项目配置,就可以构建也可以在桌面上运行的移动应用程序版本。
如果您将需要测试的所有业务逻辑放在单独的项目/程序集中,那么可以使用您已经熟悉的任何桌面工具非常有效地测试这一层。
What we've done that really improves our efficiency and quality is to multi target our mobile application. That is to say with a very little bit of creativity and a few conditional compile tags and custom project configurations it is possible to build a version of your mobile application that also runs on the desktop.
If you put all your business logic you need tested in a separate project/assembly then this layer can be very effectively tested using any of the desktop tools you are already familiar with.