使用 Visual Studio Express 进行 Silverlight 单元测试
我需要对我的 Silverlight 应用程序进行单元测试。我分离出了一个只有核心模型类的 DLL,这对于测试来说是有意义的。
问题是,我使用的是 Visual Studio Express 堆栈。我可以选择哪些单元测试?
我见过:
- ScottGu 的框架(似乎不适合我)
- Jamie 的 Silverlight NUnit 端口 (不适用于 Express)
- AgUnit(我没有 JetBrains ReSharper)
- NUnit 3.0(不存在)还)
此时我有哪些可行的选择?
I need unit testing for my Silverlight application. I've separated out a DLL that has just core model classes, which make sense to test.
Problem is, I'm on a Visual Studio Express stack. What are my options for unit testing?
I've seen:
- ScottGu's framework (don't seem to work for me)
- Jamie's Silverlight NUnit port (doesn't work with Express)
- AgUnit (I don't have JetBrains ReSharper)
- NUnit 3.0 (doesn't exist yet)
What viable options do I have at this point?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我正在使用 Jeff Wilcox 的框架(与您上面提到的 Scott Gu 的框架相同),并取得了一些成功。它并不完全优雅,但它最终完成了我需要它做的事情。这是 Silverlight 团队内部使用的内容,因此它大概应该涵盖大部分需要涵盖的内容。由于它只是在浏览器中执行,因此没有任何内容可以阻止它与 Express 一起正常工作。
请确保您获得正确的版本,即您需要 Silverlight Toolkit 在 Codeplex 上。有一次,我最终得到了一个旧版本,一旦我得到了最新的版本,我的许多问题就消失了。
如果您无法使其正常工作,也许您可以将您的问题作为单独的问题发布。我知道杰夫·威尔科克斯有时会来这里,并且之前回答过我的一些问题。
I'm using Jeff Wilcox's framework (it's the same one that you referenced up above as Scott Gu's), with some success. It's not precisely elegant, but it ends up doing what I need it to do. It's what the Silverlight team uses internally, so it should presumably cover most of what needs to be covered. And since it's just executing in the browser, there's nothing in it that should keep it from working correctly with Express.
Do make sure you get the right version, i.e., you want the DLLs that come with the Silverlight Toolkit up on Codeplex. At one point, I'd ended up with an older version, and many of my problems went away once I got the most recent bits.
If you're having trouble getting it to work correctly, perhaps you could post your problem as a separate question. I know that Jeff Wilcox hangs out here on occasion, and has answered some of my questions about it before.