可以测试写成3.5 MSTest的单元测试程序集? [英] Can Tests be written in 3.5 MsTest Unit Test assemblies?

查看:164
本文介绍了可以测试写成3.5 MSTest的单元测试程序集?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好: 我很喜欢用EX与痣玩耍......现在是时候使用它认真地覆盖旧的应用程序尽可能的。

我们已经通过转换开始.NET 3.5(客户端还不能承载在.NET 4.0中)

我们注意到,我们有麻烦越来越痣的工作。

似乎工作,如果该测试项目组件是一个.NET 4.0 - 但是,当它停止工作(安装Visual Studio 2010 SP1给这种能力后)转换的单元测试组件框架回.NET 3.5。

一直以您只能运行使用默认的主机适配器测试从测试大会,针对.NET Framework 3.5的抱怨

如果客户想要的一切是在.NET 3.5 - 包括单元测试...任何想法

解决方案

在<一结束href="http://blogs.msdn.com/b/vstsqualitytools/archive/2010/12/19/how-to-re-target-unit-tests-to-net-framework-3-5-in-vs-2010-sp1.aspx"相对=nofollow>从微软的Visual Studio测试团队博客这个帖子,在已知的限制一节,它指出:

  

的.NET Framework 3.5的测试执行只支持默认   主机适配器。

痣使用的 MolesAgentAdapter 而不是默认的,因此单元测试库必须是.NET 4.0兼容。

Hi: I've enjoyed playing around with Pex and Moles...now it's time to use it in earnest to cover an legacy app as much as possible.

We've started by converted to .NET 3.5 (the client can't yet host in .NET 4.0)

We noticed that we are having trouble with getting Moles to work.

Seems to work if the Test Project assembly is a .NET 4.0 -- but when converted the Unit Tests assembly framework back to .NET 3.5 (after installing Visual Studio 2010 SP1 to give that ability) it stops working.

Keeps complaining with "you can only run tests using the default host adapter from a test assembly that targets .NET framework 3.5"

If the client wants everything to be in .NET 3.5 -- including the unit tests...any ideas?

解决方案

At the end of this post from the MS Visual Studio Test Team blog, in the 'Known limitations' section, it states that:

Execution of .NET Framework 3.5 tests is supported only in the default host adapter.

Moles uses a MolesAgentAdapter instead of the default and so the unit test library must be .NET 4.0 compatible.

这篇关于可以测试写成3.5 MSTest的单元测试程序集?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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