用于业务逻辑的自动化 Silverlight 5 单元测试 [英] Automated Silverlight 5 Unit testing for business logic

查看:24
本文介绍了用于业务逻辑的自动化 Silverlight 5 单元测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的团队正在使用 Silverlight 5 进行开发,因为它具有我们未来需要的功能.我发现 NUnit 不像 Silverlight 那样标准地工作,而且可用于 Silverlight 测试的工具似乎主要针对在浏览器中运行,并且似乎很难实现自动化.

Our team is using Silverlight 5 for development as it has features we require going forward. I have discovered that NUnit doesn't work as standard as it isn't Silverlight and that the tools available for Silverlight testing appear to primarily be aimed at running within browsers and are a pain to automate it seems.

然而,我想要测试的很多代码是不是专门的 Silverlight 的视图模型,所以我希望有一种使用 NUnit 或类似的方法来测试它并集成到构建服务器(这是目前正在决定)

However a lot of the code I want to test is the View Models which aren't specifically Silverlight, so I was hoping there is a way of using NUnit or similar to just test this and integrating into a build server (which is currently being decided upon)

那么,是否可以通过这种方式测试 Silverlight?

So, is it possible to test Silverlight in this way?

推荐答案

我还没试过,但看起来很有趣:

I haven't tried it but looks interesting:

http://statlight.codeplex.com/

以及第三方呢(也许 Telerik 在他们的测试套件中提供了一些东西).

and what about third parties (maybe Telerik offers something on their testing suite).

我知道这并不理想,但是如果它只是 VM 并且不依赖于 UI,您可以将文件链接到 WPF 项目并执行单元测试(在我们的例子中,我们必须共享两个版本,SL 和 WPF 一个是为什么我们选择在 WPF 版本中测试我们的 VM :-)).

I know it's no ideal, but if it's just VM and non dependant on UI you can link the files to a WPF project and execute the unit tests (in our case we had to share two versions the SL and the WPF one that's why we chose to test our VM in the WPF version :-)).

Silverlight(工具包)的单元测试我还没有找到将它链接到自动构建过程的方法

The unit testing from Silverlight (toolkit) I haven't found a way to link it to an automated build process

这篇关于用于业务逻辑的自动化 Silverlight 5 单元测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆