- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试将 Cobertura 报告生成集成到我的 azure 管道中。为此,我在 .Net core 测试项目中添加了 coverlet.collector 3.0.3。以下是我用于测试运行的 yaml 命令
- task: DotNetCoreCLI@2
displayName: Test
inputs:
command: test
projects: '**/*Test/*.csproj'
arguments: '--collect:"XPlat Code Coverage" --settings CodeCoverage.runsettings --logger trx'
publishTestResults: false
我使用 Reportgenerator 任务来合并和发布覆盖率报告。这一切在我的代码的一个分支(一个旧分支,我不久前开始在其上设置管道)中运行良好。但是当我试图指向管道中的最新分支时,我收到如下错误
Data collector 'Code Coverage' message: Data collector caught an exception of type 'Microsoft.VisualStudio.Coverage.VanguardException': 'Running event not received from CodeCoverage.exe. Check eventlogs for failure reason
我已经检查了两个分支中的几乎所有内容,Microsoft.Net.Test.SDK,coverlet.collector,两者都是相同的版本。我不确定两个分支之间有什么区别,以及我应该在两个代码分支之间寻找什么差异,这可能会导致此类问题。
下面添加了成功和失败的完整日志。
成功(使用旧分支时)
C:\windows\system32\chcp.com 65001
Active code page: 65001
Info: .NET Core SDK/runtime 2.2 and 3.0 are now End of Life(EOL) and have been removed from all hosted agents. If you're using these SDK/runtimes on hosted agents, kindly upgrade to newer versions which are not EOL, or else use UseDotNet task to install the required version.
"C:\Program Files\dotnet\dotnet.exe" test I:\Agent-Win-R_work\489\s\XXXX.Business.Test\XXXX.Business.Test.csproj "--collect:XPlat Code Coverage" --settings CodeCoverage.runsettings --logger trx
Test run for I:\Agent-Win-R_work\489\s\XXXX.Business.Test\bin\Debug\netcoreapp3.1\XXXXWeb.Business.Test.dll(.NETCoreApp,Version=v3.1)
Microsoft (R) Test Execution Command Line Tool Version 16.5.0
Copyright (c) Microsoft Corporation. All rights reserved.
Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
Microsoft (R) Coverage Collection Tool Version 16.0.30319.3002
Copyright (c) Microsoft Corporation. All rights reserved.
Results File: I:\Agent-Win-R_work\489\s\XXXX.Business.Test\TestResults\SVCGIDETFSProdBld01_MP-GIDE-522C_2021-07-01_04_18_04.trx
Attachments:
I:\Agent-Win-R_work\489\s\XXXX.Business.Test\TestResults\5f62864f-6c2c-4188-ac02-0dc536b464b3\coverage.cobertura.xml
I:\Agent-Win-R_work\489\s\XXXX.Business.Test\TestResults\5f62864f-6c2c-4188-ac02-0dc536b464b3\SVCGIDETFSProdBld01_MP-GIDE-522C_2021-07-01.04_17_58.coverage
Test Run Successful.
Total tests: 6
Passed: 6
Total time: 3.8813 Seconds
失败(当指向新分支时)
C:\windows\system32\chcp.com 65001
Active code page: 65001
Info: .NET Core SDK/runtime 2.2 and 3.0 are now End of Life(EOL) and have been removed from all hosted agents. If you're using these SDK/runtimes on hosted agents, kindly upgrade to newer versions which are not EOL, or else use UseDotNet task to install the required version.
"C:\Program Files\dotnet\dotnet.exe" test I:\Agent-Win-R_work\489\s\XXXX.Test\XXXXBusiness.Test.csproj "--collect:XPlat Code Coverage" --settings CodeCoverage.runsettings --logger trx
Test run for I:\Agent-Win-R_work\489\s\XXXX.Business.Test\bin\Debug\netcoreapp3.1\XXXXWeb.Business.Test.dll(.NETCoreApp,Version=v3.1)
Microsoft (R) Test Execution Command Line Tool Version 16.5.0
Copyright (c) Microsoft Corporation. All rights reserved.
Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
Data collector 'Code Coverage' message: Data collector caught an exception of type 'Microsoft.VisualStudio.Coverage.VanguardException': 'Running event not received from CodeCoverage.exe. Check eventlogs for failure reason.'. More details: ..
Results File: I:\Agent-Win-R_work\489\s\XXXX.Business.Test\TestResults\SVCGIDETFSProdBld01_MP-GIDE-522C_2021-07-01_04_12_42.trx
Attachments:
I:\Agent-Win-R_work\489\s\XXXX.Business.Test\TestResults\3839c24a-e17d-4d0d-9953-359388d5a940\coverage.cobertura.xml
Test Run Failed.
Total tests: 6
Passed: 6
我也遇到过这个问题:https://github.com/microsoft/azure-pipelines-agent/issues/2839用户怀疑这是代理升级问题,但对我来说似乎并非如此,因为我能够为一个代码分支成功运行它。
如有任何建议或指导,我们将不胜感激。
最佳答案
当我向 Coverlet 团队提出这个问题时,我得到了他们的快速回复。他们注意到了一些我完全错过的事情。
Microsoft (R) Coverage Collection Tool Version 16.0.30319.3002
这出现在我的成功日志中,这意味着 Microsoft 代码覆盖率与 Coverlet 代码覆盖率并行运行。他们怀疑,如果同时运行两个代码覆盖率收集器,并且两个分支中运行测试的方式之间的某些计时问题会导致不同的行为,我们可能会遇到一些奇怪的错误。
当我在 .runsettings 文件中禁用 Microsoft 代码覆盖率后,问题就得到了解决
之前:
<DataCollector friendlyName="XPlat code coverage" uri="datacollector://Microsoft/CodeCoverage/2.0" assemblyQualifiedName="Microsoft.VisualStudio.Coverage.DynamicCoverageDataCollector, Microsoft.VisualStudio.TraceCollector, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
现在
<DataCollector friendlyName="XPlat code coverage">
关于azure - 封面覆盖率报告导致 Microsoft.VisualStudio.Coverage.VanguardException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68211936/
我注意到今天我们在 VS 2015 中的一个解决方案发生了变化。似乎为解决方案生成的测试项目使用与同一解决方案中现有测试项目不同的命名空间。 仅引用的测试项目 Microsoft.VisualStud
更新测试项目 NuGet 后出现此错误: The type 'TestClassAttribute' exists in both 'Microsoft.VisualStudio.QualityToo
我正在尝试设置 tfs 和 sharepoint 之间的构建集成。 我们有一个单独的构建服务器。我们已关注 these steps并检查它们的正确性 3 次。但是在 sharepoint 构建中,我们
今天在安装VS2019的时候,在安装的过程中一直无法进入安装界面,在网上找了各种方法试了将近40分钟都没有找到有效的办法,不过就快放弃的时候,问题解决了,哈哈哈!!!! 1.下载地址:https:
在 Visual Studio 中,用于在 WinForms 项目中添加元素的上下文菜单命令与 WPF 项目中显示的命令不同。事实上,我可以在第一个中看到“Add->Windows Form”,在第二
我正在创建一个多项目模板 问题是当我运行模板时,每个项目都会创建一个与项目名称匹配的目录文件夹。 我不希望每个项目都默认创建文件夹,如下所示: solutionfolder\Libraries\BL\
我下载了这门课http://www.codeproject.com/file/VersionInfo.asp 我用它从我当前运行的几个程序中获取文件信息。 当我想从我编写的程序中获取信息时,它工作正常
我正在尝试调试一个树状结构,所以我在每一层都制作了一个 watch 。我走得越低, watch 变量名称变得太长了。有没有办法重命名它们: {,,HTM_Projekt.exe}*(Node*){*}
我已经编写了一个 DLL,然后在我的解决方案中添加了对它的引用,但是当我在 usings 部分中声明它时,它给我的错误是无法识别,您是否缺少引用? 这是我设置解决方案的方式... 1-首先我创建了我的
我们有一个大型 C# 程序,分为 2 个主要组:内核 库和(客户)特定 应用程序和服务。 我们的 TFS 结构(简化)是这样的: 内核 深度学习计划 第 1 版 第 2 版 第 3 版 ... 客户A
VS 2010 Pro:我已经为我的库生成了一个类图,现在向它添加了一些类,但是类图只显示了旧类并且不会自动更新。所以我想知道这是不是这样,我应该每次都删除并重新添加类图吗?或者这些是我应该在 VS
关闭。这个问题需要更多focused .它目前不接受答案。 想改进这个问题吗? 更新问题,使其只关注一个问题 editing this post . 关闭 3 年前。 Improve this qu
我刚刚在 c# .net 中制作了一个程序,现在当我尝试保存或调试它时,我在消息框中收到此错误。这是我目前为我的项目编写的代码。错误代码“内存不足,无法继续执行程序”请帮忙。
关闭。这个问题是off-topic .它目前不接受答案。 想改善这个问题吗? Update the question所以它是 on-topic对于堆栈溢出。 8年前关闭。 Improve this q
我想扩展 Visual Studio,这样当有人右键单击解决方案资源管理器时,上下文菜单应该有一个新菜单项,比如“打开自定义表单”,单击哪个应该打开一个表单(这个表单实际上会接受一些设置并修改配置相应
IDE在启动时在启动屏幕上崩溃。我查看了日志,发现了很多错误: 14 2017/07/09 07:28:50.672 Information VisualSt
有没有人想知道 VisualStudio 将区域状态存储在源代码中的什么位置(展开或折叠?)。据我所知,它们没有存储在解决方案、项目或源文件中...... 最佳答案 所有这些类型的设置(区域折叠状态、
我正在使用T4(文本模板转换工具包)进行一些工作,并试图达到可以创建自己的自定义文本模板宿主的地步。但是,所有这些都依赖于 Microsoft.VisualStudio.TextTemplating
我创建了一个名为“WordpressAutomation”的新解决方案 我在这个解决方案中创建了一个名为“WordpressAutomation”的新项目,一个类库 我在这个解决方案中创建了一个新项目
最近我试用了 Visual Studio 2017。我们有一个 MSDN 订阅。我们正在开发一些我们正在编写为 WPF 应用程序的内部应用程序。这些应用程序需要安装在用户没有管理权限的用户计算机(Wi
我是一名优秀的程序员,十分优秀!