Visual Studio 团队服务 - 发布管理找不到测试
Visual Studio Team Services - Release Management cannot locate tests
在发布管理中使用 Visual Studio 测试任务时,发布总是 returns:
No test assemblies found matching the pattern
目前测试程序集设置为:**\*test*.dll;-:**\obj\**
我已经尝试了多个默认设置,例如 $(System.DefaultWorkingDirectory)
等
我能够找到的文档与现有的任务布局不一致(例如发布构建工件屏幕不再包含 内容 框) , 适用于内部部署 Visual Studio 2015,或与 Build 相关。
我已阅读并尝试了以下内容:
- https://msdn.microsoft.com/Library/vs/alm/Release/getting-started/deploy-to-azure
- https://msdn.microsoft.com/Library/vs/alm/Release/author-release-definition/understanding-tasks
- https://msdn.microsoft.com/en-us/library/gg265783.aspx#Activity_RunTests
- http://blogs.msdn.com/b/visualstudioalm/archive/2015/07/31/dev-test-in-azure-and-deploy-to-production-on-premises.aspx
- http://blogs.msdn.com/b/visualstudioalm/archive/2015/05/29/testing-in-continuous-integration-and-continuous-deployment-workflows.aspx
更新:
我在构建中添加了一个步骤来复制和发布 test.dlls。他们现在找到了。由于缺少其他代码,它们都失败了,但它们已找到。
更新二:
我的 3_Run_Tests.log 文件包含以下线索:
Error calling Initialization method for test class ... To run tests that interact with the desktop, you must set up the test agent to run as an interactive process.
Test Run deployment issue: The assembly or module ... directly or indirectly referenced by the test container ... was not found.
鉴于以上原因,我将接受@eddie-msft 的回答。
您需要确保您要测试的项目的编译文件也被复制并发布到与Test Assembly相同的路径。如果仅复制测试程序集,测试将失败。
假设你正在做一个C#项目,在复制测试程序集的步骤中,你可以将复制内容设置为:
**\YourTestProjectName\bin$(BuildConfiguration)
我也遇到过类似的问题。构建中的多个项目和测试文件将找不到。
未找到匹配模式 *test*.dll;-:\obj**
的测试程序集
修复:添加了额外的构建步骤 "build solution" 和 "Copy Files to"。此构建指向带有自动测试的 VS 解决方案文件。 "Copy Files to" 保留为默认值
在发布管理中使用 Visual Studio 测试任务时,发布总是 returns:
No test assemblies found matching the pattern
目前测试程序集设置为:**\*test*.dll;-:**\obj\**
我已经尝试了多个默认设置,例如 $(System.DefaultWorkingDirectory)
等
我能够找到的文档与现有的任务布局不一致(例如发布构建工件屏幕不再包含 内容 框) , 适用于内部部署 Visual Studio 2015,或与 Build 相关。
我已阅读并尝试了以下内容:
- https://msdn.microsoft.com/Library/vs/alm/Release/getting-started/deploy-to-azure
- https://msdn.microsoft.com/Library/vs/alm/Release/author-release-definition/understanding-tasks
- https://msdn.microsoft.com/en-us/library/gg265783.aspx#Activity_RunTests
- http://blogs.msdn.com/b/visualstudioalm/archive/2015/07/31/dev-test-in-azure-and-deploy-to-production-on-premises.aspx
- http://blogs.msdn.com/b/visualstudioalm/archive/2015/05/29/testing-in-continuous-integration-and-continuous-deployment-workflows.aspx
更新: 我在构建中添加了一个步骤来复制和发布 test.dlls。他们现在找到了。由于缺少其他代码,它们都失败了,但它们已找到。
更新二: 我的 3_Run_Tests.log 文件包含以下线索:
Error calling Initialization method for test class ... To run tests that interact with the desktop, you must set up the test agent to run as an interactive process.
Test Run deployment issue: The assembly or module ... directly or indirectly referenced by the test container ... was not found.
鉴于以上原因,我将接受@eddie-msft 的回答。
您需要确保您要测试的项目的编译文件也被复制并发布到与Test Assembly相同的路径。如果仅复制测试程序集,测试将失败。
假设你正在做一个C#项目,在复制测试程序集的步骤中,你可以将复制内容设置为:
**\YourTestProjectName\bin$(BuildConfiguration)
我也遇到过类似的问题。构建中的多个项目和测试文件将找不到。
未找到匹配模式 *test*.dll;-:\obj**
的测试程序集修复:添加了额外的构建步骤 "build solution" 和 "Copy Files to"。此构建指向带有自动测试的 VS 解决方案文件。 "Copy Files to" 保留为默认值