在 nunit-console.exe 内运行 silverlight 单元测试
最好的方法是什么?我想让它与 nCover 一起工作。
What is the best way to do this? I want to get this working with nCover.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我尝试了一下,并且很接近……但最终它对我来说并没有真正成功。
Test Driven 的人制作了一个用于在 nunit 中测试 silverlight 的模板。我将其升级到 Silverlight 4.0,然后运行 nCover。
概念验证效果很好……但是当我在实际产品上尝试时,事情很快就崩溃了。
我们的许多单元测试引用了 AGcore 和其他引用的 GUI 对象,这就是为什么我认为我不断收到某种跨线程错误的原因。
我读到 SilverUnit 或许可以做这种事情……但是你必须为每个开发者支付 700 多美元。我希望写这篇文章的人考虑单独出售它。
哦,好吧……也许有一天我会看到代码覆盖率数字……但不是今天:-)
I made a run at this and came close... but in the end it didn't really work out for me.
The guy from Test Driven made a template for testing silverlight in nunit. I upgraded this to Silverlight 4.0 then I ran nCover.
The proof of concept worked great... but when I tried it on our actual product things fell apart pretty quick.
Many of our unit tests reference AGcore and others referent GUI objects, which is why I think I kept getting some sort of cross threading error.
I read that SilverUnit may be able to do this sort of thing... but you have to pay 700+ dollars per developer. I wish the guy who wrote that would consider selling it separately.
Oh well... someday maybe I'll see code coverage numbers... not today though :-)
zachary,
您能否提供有关“概念验证效果很好”的更多详细信息? NCover 无法分析 Silverlight,因为它不支持 CLR。
zachary,
Can you provide more detail on "the proof of concept worked great"? NCover is not able to profile Silverlight because it does not support the CLR.