java - IntelliJ IDEA 测试覆盖率窗口不显示

标签 java spring-boot intellij-idea jetbrains-ide

我正在将 Spring Boot 项目与最新版本的 IntelliJ IDEA(2018.2.1 终极版)一起使用。

当我用覆盖率运行我的所有测试时,覆盖率窗口不显示,并且在我的主要类旁边没有百分比。

我尝试通过转到 View -> Tool Windows -> Coverage 启用覆盖范围窗口,但覆盖范围选项卡被禁用(不可点击)。

enter image description here

如果我没记错的话,在我更新 IntelliJ 之前,覆盖率工作正常。这是上一个版本的错误吗?

编辑
覆盖插件已经安装
enter image description here

最佳答案

可能 Coverage 插件已安装但在您的机器上被禁用,例如启用插件后 IntelliJ 未重新启动。仔细检查 Coverage 插件是否已启用后尝试重新启动。根据 IntelliJ Code Coverage docs :

Prerequisite

Make sure the Code Coverage plugin is enabled. The plugin is activated by default. If the plugin is disabled, enable it on the Plugins settings page as described in Managing Plugins. If the plugin is disabled, the code coverage tabs will not be visible in the run/debug configuration dialogs.

尝试打开“设置”>“构建、执行、部署”>“覆盖”并选中“激活覆盖 View ”复选框。之后使用 Coverage 运行另一个测试。

关于java - IntelliJ IDEA 测试覆盖率窗口不显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51790354/

相关文章:

java - IntelliJ 中的 TestNG 报告不显示 Cucumber 场景和步骤详细信息

linux - 每天在 Linux VM 中进行高效编码 - 一种可能的方法吗?

java - 带参数的 Swing 可运行

java - 无法使用 spring-boot-devtools 运行 2 个 Web 服务器

java - 简单的嵌套 for 循环示例

spring-boot - 将自定义 header 添加到 REST PUT 请求

spring-boot - 如何使用 Spring Boot 2.0 通过 PushGateway 将指标导出到 Prometheus

javascript - 在 JavaScript 的空操作(空)函数中不添加换行符的选项(IntelliJ Web/PHP Storm )

java - BigQuery 和客户端库之间的数据传输是否安全?

java - 如何在 Oracle SQL 中的 Select 语句中重命名表列?