VS2010 Professional下多个解决方案中使用MSTest项目的问题
我有一个解决方案,其中包括实用函数的程序集和用于测试这些函数的 MSTest 项目。其中之一依赖于 DLL,它被神奇地复制到正确的测试输出文件夹,并且我的所有测试都运行良好。
我还有一个“主”解决方案,其中包括我的所有程序集及其各自的 MSTest 项目。这里的问题是,需要其他 DLL 的 MSTest 项目无法运行某些测试,因为缺少依赖项。
我阅读了修改 Local.testsettings 的内容,并添加了所需的文件,但测试仍然失败,并且我在 Out 文件夹中没有看到 DLL。这两种解决方案之间的一个显着区别是,前者包含 Local.testsettings、project.vsmdi 和 TraceAndTestImpact.testsettings,而后者则不包含。我盲目地将这些文件添加到后一个解决方案中,但这会导致问题,例如其他测试无法正常运行,此外它并不能解决我原来的问题。
创建聚合所有单元测试项目的主解决方案是否有特殊技巧?
I've got a solution that includes an assembly for utility functions, and an MSTest project for testing those functions. One of them depends on a DLL, which by magic is copied to the correct test output folder, and all of my tests work great.
I've also got a "master" solution that includes all of my assemblies and their respective MSTest projects. The problem here is that the MSTest project which requires that other DLL fails to run some of the tests because the dependency is missing.
I read up on modifying Local.testsettings, and I added the required file, but the test still fails and I don't see the DLL in the Out folder. One notable difference between the two solutions is that the former includes Local.testsettings, project.vsmdi, and TraceAndTestImpact.testsettings, whereas the latter does not. I've blindly added those files to the latter solution, but this causes issues, like other tests not running properly, and in addition it doesn't fix my original problem.
Is there a special trick to creating a master solution that aggregates all of my unit test projects?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您提到您已将 Local.testsettings 添加到项目中,但是您是否在设置中启用了部署并将 dll 添加为要部署的文件?
其他一些建议:
You mention that you've added the Local.testsettings to your project, but have you enabled deployment in the settings and added the dll as a file to deploy?
Few other recommendations: