TRX Logger在天蓝色角色上不可用

时间:2013-07-24 05:57:40

标签: testing logging azure

我正在尝试使用vstest.console.exe测试运行器对azure角色运行测试。它在模拟器上运行良好,但在真正的天蓝色云实例中,我想使用的TRX-Logger不可用。

我正在将洞测试Runner文件夹复制到我的云实例,其中包含“... \ TestWindow \”文件夹子文件夹中的所有DLL文件和依赖项。还有一个用于TfsLogger的dll文件,以及TrxLogger的dll文件。但是当我运行vstest.console.exe时,它声明/ logger:trx选项无效,因为trx不是有效的URI或友好名称。当我列出vstest.console.exe的所有可用记录器时,我只得到2个测试记录器“Console”和“TfsLogger”(或“TfsPublisher”)。

这是我的扩展程序文件夹的内容:

E:\approot\TestRunner\Extensions\Microsoft.VisualStudio.TestPlatform.Extensions.dll
E:\approot\TestRunner\Extensions\Microsoft.VisualStudio.TestPlatform.Extensions.GenericTestAdapter.dll
E:\approot\TestRunner\Extensions\Microsoft.VisualStudio.TestPlatform.Extensions.MSAppContainerAdapter.dll
E:\approot\TestRunner\Extensions\Microsoft.VisualStudio.TestPlatform.Extensions.OrderedTestAdapter.dll
E:\approot\TestRunner\Extensions\Microsoft.VisualStudio.TestPlatform.Extensions.TfsLogger.dll
E:\approot\TestRunner\Extensions\Microsoft.VisualStudio.TestPlatform.Extensions.TmiAdapter.dll
E:\approot\TestRunner\Extensions\Microsoft.VisualStudio.TestPlatform.Extensions.TrxLogger.dll
E:\approot\TestRunner\Extensions\Microsoft.VisualStudio.TestPlatform.Extensions.VSTestIntegration.dll
E:\approot\TestRunner\Extensions\Microsoft.VisualStudio.TestPlatform.UnitTestFramework.dll
E:\approot\TestRunner\Extensions\Microsoft.VisualStudio.TestTools.CppUnitTestFramework.ComInterfaces.dll
E:\approot\TestRunner\Extensions\Microsoft.VisualStudio.TestTools.CppUnitTestFramework.CppUnitTestExtension.dll; 

有没有人知道为什么trx logger在azure实例(worker角色)上不可用,但TfsLogger是,而两个dll文件都在vstest.console.exe的同一子文件夹中可用?是否可以“安装”或使TrxLogger可用于我的测试运行器?!

祝你好运

塞巴斯蒂安

1 个答案:

答案 0 :(得分:3)

我知道这是一个老问题,但我遇到了一个类似的问题,我只有Console& TfsLogger,但没办法拥有TrxLogger。 不同之处在于我没有使用Azure,我在我的CI测试服务器上,我只安装了MSBuild 2013,作为新的" Microsoft Build Tools Package"的一部分。 它安装了所有东西,但我无法拥有适用于MSBuild VS 2013的TrxLogger,而它在VS 2012中运行良好。

经过一些搜索,我启用了vstest.console的日志记录(通过将TpTraceLevel从其配置文件设置为4),并在Local Temp文件夹中记录了一些信息。

只是看到它尝试加载TrxLogger程序集失败(对不起法语消息:):)

W, 3384, 1, 2014/03/07, 10:46:08.269, 2034438793, vstest.console.exe, TestPluginDiscoverer: Failed to get types from assembly 'Microsoft.VisualStudio.TestPlatform.Extensions.TrxLogger, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.  Skipping test extension scan for this assembly.  Error: System.Reflection.ReflectionTypeLoadException: Impossible de charger un ou plusieurs des types requis. Extrayez la propriété LoaderExceptions pour plus d'informations.
   à System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
   à System.Reflection.RuntimeModule.GetTypes()
   à System.Reflection.Assembly.GetTypes()
   à Microsoft.VisualStudio.TestPlatform.Core.TestPluginsFramework.TestPluginDiscoverer.GetTestExtensionsFromAssembly(Assembly assembly, Dictionary`2 testDiscoverers, Dictionary`2 testExecutors, Dictionary`2 testSettingsProviders, Dictionary`2 testLoggers)

W, 3384, 1, 2014/03/07, 10:46:08.269, 2034439310, vstest.console.exe, LoaderExceptions: System.IO.FileNotFoundException: Impossible de charger le fichier ou l'assembly 'Microsoft.VisualStudio.QualityTools.Common, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' ou une de ses dépendances. Le fichier spécifié est introuvable.
Nom de fichier : 'Microsoft.VisualStudio.QualityTools.Common, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
   à System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   à System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   à System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   à System.Reflection.Assembly.Load(AssemblyName assemblyRef)
   à Microsoft.VisualStudio.TestPlatform.Core.TestPluginsFramework.TestPluginCache.CurrentDomain_AssemblyResolve(Object sender, ResolveEventArgs args)
   à System.AppDomain.OnAssemblyResolveEvent(RuntimeAssembly assembly, String assemblyFullName)

为简化起见,我最终要做的是在我的服务器上安装整个Visual Studio 2013,但由于我的ReferenceAssemblies文件夹中有Microsoft.VisualStudio.QualityTools.Common程序集,我可能只需要一些方法来引用它(添加路径或其他东西)

相关问题