如何配置Coverage插件以附加覆盖套件? [英] How to configure the Coverage plugin to append coverage suites?

查看:1618
本文介绍了如何配置Coverage插件以附加覆盖套件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Coverage 是IntellijIDEA的插件(返回许多版本) 。它捕获给定运行配置的代码覆盖率统计信息。

Coverage is a plugin for IntellijIDEA (going back many releases). It captures code coverage statistics for a given run configuration.

根据文档我们应该能够将结果附加到多次运行中,方法是选择它作为默认行为,或者在应用coverage之前让Intellij提示设置编辑。

According to the documentation we should be able to append the results for multiple runs either by selecting it as the default behavior or by having Intellij prompt for the settings before applying coverage to the editor.

但设置似乎永远不会得到应用。如果我选择被提示;我从未被提示过。如果我选择追加它们;他们永远不会被追加。我的团队中有一位成员表示他们 提示,但结果并不反映他们的选择。

But the settings never seem to get applied. If I choose to be prompted; I'm never prompted. If I choose to append them; they're never appended. One member on my team says they are prompted but the results do not reflect their choice.

我已经尝试了我能想到的一切:

I've tried everything I can think of:


  1. 在我的workspace.xml文件中手动更改Coverage的设置

  2. 停用并重新激活Coverage

  3. 已卸载并重新安装Coverage

  4. 尝试使用其他跑步者进行Coverage(Emma和JaCoCo)

  5. 甚至已卸载并且重新安装了Intellij,希望我带着以前安装的错误设置。

  1. Manually changed settings for Coverage in my workspace.xml file
  2. Deactivated and reactivated Coverage
  3. Uninstalled and reinstalled Coverage
  4. Tried using the other runners for Coverage (Emma and JaCoCo)
  5. Even uninstalled and reinstalled Intellij with hopes I was carrying around faulty settings from a previous install.

没有任何作用。

我错过了一些明显的东西;如何配置Coverage以附加覆盖套件?我认为这是一个错误,但可能有一些解决办法吗?

Am I missing something obvious; how do I configure Coverage to append coverage suites? I'm thinking it's a bug but is there perhaps some workaround possible?

推荐答案

有一种解决方法,但它不涉及追加套房,它有点难看。

There's a workaround but it doesn't involve appending the suites and it's a bit ugly.

我找不到修复附加套件的方法,但覆盖范围适用于运行配置。那么,如果你想要添加一个现有套件,你可以做什么,你可以添加另一个运行配置并运行覆盖范围来为该运行生成套件。

I can't find a way to fix appending suites but coverage is applied to run configurations. So, what you can do if you have an existing suite you want to add to, you can add another run configuration and run with coverage to generate a suite for that run.

你最终得到的是许多套房,然后你必须合并; Coverage中的合并功能有效。请注意,没有覆盖套件追加;没有生成新文件。它只是将结果合并到覆盖范围视图中,允许生成总报告。

What you end up with is a number of suites you then have to merge; the merging functionality in Coverage works. Note that no coverage suites are appended; no new files are generated. It simply merges the results into the coverage view allowing a total report to be generated.



查看合并的覆盖率数据:


To view merged coverage data:


  1. Ctrl + Alt + F6

  2. 选择一个或更多要合并的承保套件

  3. 点击显示所选

合并后的视图套件数据应出现在编辑器中。

A view of the merged suite data should appear in the editor.

这篇关于如何配置Coverage插件以附加覆盖套件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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