简体   繁体   English

在nunit-console.exe中运行Silverlight单元测试

[英]Run a silverlight unit test inside of nunit-console.exe

What is the best way to do this? 做这个的最好方式是什么? I want to get this working with nCover. 我想让它与nCover一起工作。

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. 来自Test Driven的家伙制作了一个模板,用于在nunit中测试silverlight。 I upgraded this to Silverlight 4.0 then I ran nCover. 我将此升级到Silverlight 4.0,然后运行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. 我们的许多单元测试都引用AGcore和其他引用的GUI对象,这就是为什么我认为我不断收到某种交叉线程错误的原因。

I read that SilverUnit may be able to do this sort of thing... but you have to pay 700+ dollars per developer. 我读到SilverUnit也许可以做这种事情...但是您必须为每个开发人员支付700多个美元。 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, 扎卡里

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. NCover无法配置Silverlight,因为它不支持CLR。

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

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