Visual Studio Test Explorer Error Logs

自古美人都是妖i 提交于 2019-12-11 01:09:24

问题


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.

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.

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?


回答1:


There is a MSDN Blog post about this.

Essentially, you need to:

  1. Go to folder %VSInstallDir%\Common7\IDE\CommonExtensions\Microsoft\TestWindow
  2. Find the config file for the process you want to debug (e.g. vstest.console.exe.config, vstest.discoveryengine.exe.config, etc)
  3. Alter the config file system.diagnostics node to include:

    <system.diagnostics> 
        <switches> 
            <add name="TpTraceLevel" value="4" /> 
        </switches> 
    </system.diagnostics>
    
  4. Close VisualStudio, open it again, and discover/run tests from TestExplorer Window
  5. Look for logs under %temp%[processname].TpTrace.log (e.g. vstest.console.tptrace.log)


来源:https://stackoverflow.com/questions/27365753/visual-studio-test-explorer-error-logs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!