Service Fabric服务没有代码覆盖率 [英] No Code Coverage for Service Fabric services

查看:65
本文介绍了Service Fabric服务没有代码覆盖率的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在工作
获得代码覆盖率I
我按照此处提到的步骤进行操作;
https://social. technet.microsoft.com/wiki/contents/articles/1139.code-coverage-for-azure-services.aspx
-我在以下代码中构建代码调试模式
-我检测了exe并在\ bin \ x64 \ Debug文件夹中为我的项目生成的dlls
-我启动了覆盖率监视器
-我将该项目部署到本地1节点服务结构位于C:\ SfDevCluster \,而pkg文件位于C:\ SfDevCluster \ Data \ ImageStoreShare \ Store \ ApiApplication \ ServicePkg.Code.1.0.0
-手动运行测试通过执行已部署的API来大摇大摆
-停止了覆盖范围监视器
-打开了覆盖文件

但是,我总是在那儿看到是空代码覆盖文件,产生以下错误:
"空结果生成:没有检测到二进制文件.确保测试已运行,所需的二进制文件已加载,符号匹配 文件,并且未通过自定义设置排除.有关更多信息,请参见https://go.microsoft.com/fwlink/?LinkID=253731" 

I am working on code coverage analysis for a service fabric based API service. 

To get the code coverage I instrumented the output files (exe and dlls) of my project. 

I followed the steps mentioned here 
https://social.technet.microsoft.com/wiki/contents/articles/1139.code-coverage-for-azure-services.aspx

-I build my code in debug mode
-I instrumented the exe and dlls generated for my project in \bin\x64\Debug folder
-I started the coverage monitor
-I deployed the project to local 1 node service fabric at C:\SfDevCluster\ and the pkg files are at C:\SfDevCluster\Data\ImageStoreShare\Store\ApiApplication\ServicePkg.Code.1.0.0
-Run the tests manually on swagger by executing the deployed APIs
- Stopped the coverage monitor
- Opened the coverage file

However, I always see there is empty code coverage file generate with below error:

"Empty results generated: No binaries were instrumented. Make sure the tests ran, required binaries were loaded, had matching symbol files, and were not excluded through custom settings. For more information see https://go.microsoft.com/fwlink/?LinkID=253731" 

推荐答案

RiddhiK,以了解您的问题更好,您可以验证您是否正在Azure API App Service上运行它吗?
RiddhiK, to understand your issue better, can you please verify that you are running this on an Azure API App Service?


这篇关于Service Fabric服务没有代码覆盖率的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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