具有多个程序集的Opencover [英] Opencover with multiple assemblies

查看:94
本文介绍了具有多个程序集的Opencover的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将三个单元测试项目(三个不同的dll)组合到一个OpenCover报告中.是否有可能?我试图研究过滤器,但在OpenCover Wiki网站上没有看到足够的详细信息(示例).有人可以阐明我的起点吗?

I am trying to combine three unit testing projects (three different dlls) into one OpenCover report. Is it possible? I tried to look into filters but I don't see enough detail (examples) in the OpenCover Wiki site. Can someone shed some lights on where I can start?

非常感谢!

推荐答案

是可以的.如果您使用的是nunit(或其他测试运行程序),则可以(通常)同时运行所有测试程序集

Yes it is possible. If you are using nunit (or some other test runner) you can (usually) run all test assemblies at the same time

例如

opencover.console.exe 
    -register:user 
    "-target:nunit-console.exe" 
    "-targetargs:test1.dll test2.dll /noshadow" 
    "-filter:+[*]* -[test*]*" 

或者,如果您使用不同的测试运行程序(或使用同一测试运行程序进行多次运行),则可以分别运行它们并使用报告生成器来创建单个html报告.

alternatively if you are using different test runners (or multiple runs using the same test runner) then you can run them separately and merge the results using reportgenerator to create a single html report.

如果您有任何特定问题,请在下面发表评论以进行澄清.

If you have any specific issues please comment below for clarification.

这篇关于具有多个程序集的Opencover的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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