【发布时间】:2017-10-17 06:34:54
【问题描述】:
我正在尝试基于 Visual Studio 运行程序运行 speflow 测试,但在 vsts 中出现错误。我正在使用以下vsts 测试运行器任务:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe myassembly.dll
错误:
System.Reflection.ReflectionTypeLoadException:无法加载一种或多种请求的类型
检索 LoaderExceptions 属性以获取更多信息。
我试过了:
/TestAdapterPath: "Adapterpath"/UseVsixExtensions:True/False(Both option)/Platform:[ platform type ]
...但这些都不起作用;测试在 Visual Studio 2017 中运行良好,但仍无法在 CI 工作中运行。
【问题讨论】:
-
您将哪个测试运行器与 VSTest 结合使用? SpecFlow+Runner、MsTest、XUnit、NUnit?
-
@AndreasWillich 这是 xunit
-
是核心测试项目吗?你能用一个新项目重现这个问题吗?将 system.debug 变量设置为 true,然后在 OneDrive 上排队构建并共享详细日志。
-
是的,它是核心测试项目。
-
可以分享一下OneDrive上的详细日志吗?你能用一个新项目重现这个问题吗?
标签: visual-studio-2017 azure-devops specflow azure-pipelines-build-task