简体   繁体   中英

Azure DevOps - Visual studio - Local debugging

I had few unit test cases in the project which was running fine for many days and it started failing suddenly. I am able to run these failed test cases locally where I am getting all passed. I am getting below error in azure devops. I usually get this error locally when I am not targeting for x64 platform. But I do have testsettings file for setting the target for x64. I am using non-yaml build. Is there a way I can locally debug what is AzDevOps is using under the UX? or any guidance on how to approach troubleshooting for Azure Devops.

Test method xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx threw exception: 
System.TypeLoadException: Method 'ReportApplicationHealth' in type 'System.Fabric.Fakes.StubICodePackageActivationContext' 
from assembly 'System.Fabric.5.0.0.0.Fakes, Version=5.0.0.0, Culture=neutral, 
PublicKeyToken=0ae41878053f6703' does not have an implementation.



<?xml version="1.0" encoding="utf-8"?>
<RunSettings>
  <!-- Configurations that affect the Test Framework -->
  <RunConfiguration>
    <MaxCpuCount>1</MaxCpuCount>
    <TargetPlatform>x64</TargetPlatform>
    <TargetFrameworkVersion>Framework45</TargetFrameworkVersion>
  </RunConfiguration>
  <MSTest>
    <MapInconclusiveToFailed>False</MapInconclusiveToFailed>
    <CaptureTraceOutput>False</CaptureTraceOutput>
    <DeleteDeploymentDirectoryAfterTestRunIsComplete>False</DeleteDeploymentDirectoryAfterTestRunIsComplete>
    <DeploymentEnabled>False</DeploymentEnabled>
  </MSTest>
</RunSettings>

在此处输入图像描述 在此处输入图像描述

You won't be able to debug this on Microsoft-host agents. This is possible only for your own host agent, because you have full access to your own machines.

If you have different results in your unit tests think what can be different? TimeZone? Culture? Try to print out as many things as possible to console to see difference. You must track it down with there prmitive techniques, but honestly this is only thing which is in your pocket.

You can also show us your unit tests here, maybe we will be able to help you out with this.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM