Visual Studio 测试资源管理器错误日志 [英] Visual Studio Test Explorer Error Logs

查看:44
本文介绍了Visual Studio 测试资源管理器错误日志的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试解决一个问题,当我在不同的配置环境中时,测试资源管理器不显示测试.我通过更新我的 app.config 来更改本地环境.

I've been attempting to fix a problem I have with Test Explorer not showing tests when I'm in a different configuration environment. I make local environment changes by updating my app.config.

我已经尝试了此处和其他站点中的一些步骤,包括清理我的项目、更新到最新的 xUnit 测试运行程序等.

I have already tried a few steps found here and in other sites including cleaning my project, updating to the latest xUnit test runner, etc.

我确定原因是基于代码/项目而不是 Visual Studio 环境本身.我想知道的是是否有我可以查看的日志文件可以帮助我确定为什么我的测试没有显示.或者,是否有另一种好方法可以解决测试资源管理器中未显示的测试错误?

I am sure the reason is code/project based and not the Visual Studio environment itself. What I would like to know is whether or not there is a log file I can look at that would help me to determine why my tests are not showing. Or, is there another good method to troubleshoot errors with tests not showing up in Test Explorer?

推荐答案

有一个MSDN 博客文章.

基本上,您需要:

  1. 转到文件夹 %VSInstallDir%\Common7\IDE\CommonExtensions\Microsoft\TestWindow
  2. 找到要调试的进程的配置文件(例如 vstest.console.exe.config、vstest.discoveryengine.exe.config 等)
  3. 更改配置文件 system.diagnostics 节点以包括:

<system.diagnostics> 
    <switches> 
        <add name="TpTraceLevel" value="4" /> 
    </switches> 
</system.diagnostics>

  • 关闭 VisualStudio,再次打开它,然后从 TestExplorer 窗口发现/运行测试
  • 在 %temp%[processname].TpTrace.log 下查找日志(例如 vstest.console.tptrace.log)
  • 这篇关于Visual Studio 测试资源管理器错误日志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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