You might also look at http://unitdriven.codeplex.com - it is a Silverlight and WP7 unit test framework/runner, that also has an add-in DLL for nunit/mstest so you can write tests and have the same test code run in .NET, Silverlight and WP7.
As long as you are testing non-async behaviors, UnitDriven is pretty compatible with nunit (we built it to run a few hundred pre-existing nunit tests). It does have its own model for async tests - again specifically designed so the same test code runs in .NET, SL and WP7.
What you are searching for is nunit-silverlight. You need to reference "NUnit.Silverlight.Framework.dll" and "NUnit.Silverlight.Compatibility.dll" (SilverLight 3 versions), and make all references "local copy", even the .NET framework.
If you use Visual Studio Express Edition, there is still some obstacles that I detailed a bit more on my blog. In short: Express Edition doesn't include tests or add-ins, and it should work fine with external test runners but for my part I've got an exception in NUnit's GUI, so one may need something else to run his tests (NUnit-Console, Gallio, Autotest.NET, ...). I use TddBarForPhone (available on codeplex), a tool I made which runs NUnit-Console after each build and color the results in red or green.
发布评论
评论(6)
您还可以查看 http://unitdriven.codeplex.com - 它是一个 Silverlight 和 WP7 单元测试框架/runner,它还有一个用于 nunit/mstest 的附加 DLL,因此您可以编写测试并在 .NET、Silverlight 和 WP7 中运行相同的测试代码。
只要您正在测试非异步行为,UnitDriven 就与 nunit 非常兼容(我们构建它是为了运行数百个预先存在的 nunit 测试)。它确实有自己的异步测试模型 - 再次经过专门设计,因此相同的测试代码可以在 .NET、SL 和 WP7 中运行。
You might also look at http://unitdriven.codeplex.com - it is a Silverlight and WP7 unit test framework/runner, that also has an add-in DLL for nunit/mstest so you can write tests and have the same test code run in .NET, Silverlight and WP7.
As long as you are testing non-async behaviors, UnitDriven is pretty compatible with nunit (we built it to run a few hundred pre-existing nunit tests). It does have its own model for async tests - again specifically designed so the same test code runs in .NET, SL and WP7.
您要搜索的是 nunit-silverlight。您需要引用“NUnit.Silverlight.Framework.dll”和“NUnit.Silverlight.Compatibility.dll”(SilverLight 3 版本),并使所有引用成为“本地副本”,甚至是 .NET 框架。
如果您使用 Visual Studio Express Edition,仍然存在一些障碍,我在 我的博客。简而言之:Express Edition 不包含测试或加载项,它应该可以与外部测试运行程序一起正常工作,但就我而言,我在 NUnit 的 GUI 中遇到了异常,因此可能需要一些东西否则运行他的测试(NUnit-Console,Gallio,Autotest.NET,...) 。我使用 TddBarForPhone (在 codeplex 上提供),这是我制作的一个工具,它在每次构建后运行 NUnit-Console 并为结果为红色或绿色。
What you are searching for is nunit-silverlight. You need to reference "NUnit.Silverlight.Framework.dll" and "NUnit.Silverlight.Compatibility.dll" (SilverLight 3 versions), and make all references "local copy", even the .NET framework.
If you use Visual Studio Express Edition, there is still some obstacles that I detailed a bit more on my blog. In short: Express Edition doesn't include tests or add-ins, and it should work fine with external test runners but for my part I've got an exception in NUnit's GUI, so one may need something else to run his tests (NUnit-Console, Gallio, Autotest.NET, ...). I use TddBarForPhone (available on codeplex), a tool I made which runs NUnit-Console after each build and color the results in red or green.
由于 Windows Phone 7 基本上只是 Silverlight 3,我怀疑它会没问题。
有很多关于将 NUnit 与 Silverlight 结合使用的帖子,因此尝试一下,您可能会取得很大的成功。
以下是关于在 Silverlight 中使用 TestDriven.Net 和 NUnit 的内容: http://weblogs.asp.net/nunitaddin/archive/2008/05/01/silverlight-nunit-projects.aspx
As Windows Phone 7 is basically just Silverlight 3 I suspect that it will be fine.
There are multiple posts about using NUnit with Silverlight, so give them a try and you will probably have lots of success.
Here is one on using TestDriven.Net and NUnit with Silverlight: http://weblogs.asp.net/nunitaddin/archive/2008/05/01/silverlight-nunit-projects.aspx
我最近发现了以下工具,它们对 CI 集成有额外的帮助。
http://justinangel.net/WindowsPhone7EmulatorAutomation
以及更多相关内容(实际上是一系列文章,分为 5 个部分) :
http://blogs.msdn .com/b/vsdteam/archive/2007/11/20/corecon-api-part-1.aspx
I have recently discoverted the following tools which can be additionaly helpful for CI-Integration.
http://justinangel.net/WindowsPhone7EmulatorAutomation
and more on that (which is a series of articles having 5 parts actually):
http://blogs.msdn.com/b/vsdteam/archive/2007/11/20/corecon-api-part-1.aspx
我发现了很棒的截屏 最近展示了如何连接 NUnit,以便您可以在 Windows Phone 7 平台上进行 tdd。
它不使用任何 silverlight 模板/等,只是一个普通的 WP7 类库和 NUnit
I found a great screencast recently that shows how to wire up NUnit so you can tdd on the Windows Phone 7 platform.
It's not using any silverlight templates/etc just a plain WP7 class library and NUnit
我已经准备好这个端口一段时间了,最后将其上传到 NuGet.org
NuGet 包:
http://www.nuget.org/packages/NUnit.WP
来源:http://bitbucket.org/jesperll/nunit-silverlight
I've had a port of this ready for a while and finally uploaded it to NuGet.org
NuGet package:
http://www.nuget.org/packages/NUnit.WP
Source: http://bitbucket.org/jesperll/nunit-silverlight