intellij-idea - IntelliJ 代码覆盖率 : how to know which unit tests covered lines in source code

标签 intellij-idea code-coverage

我对 IntelliJ 的这个很棒的功能还很陌生。当我运行代码覆盖时,我可以在 IDE 中看到指示该行是否被覆盖的绿色标记和指示该行是否被覆盖的红色标记 此行是否未被覆盖。这很棒。但我想看看覆盖这些行的单元测试是什么。

当我点击绿色标记时,我只看到点击次数:

enter image description here

你知道怎么看吗?

最佳答案

首先您需要在运行配置中启用“Tracing”: enter image description here

然后您可以使用“显示测试覆盖线”按钮: enter image description here

关于intellij-idea - IntelliJ 代码覆盖率 : how to know which unit tests covered lines in source code,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69267228/

相关文章:

java - 主意。如何从外部文件导入 code_scheme?

continuous-integration - 单元测试覆盖率;图形显示

osx-lion - monocov 未在 (OS X 10.7.4) 上生成输出

intellij-idea - Intellij IDEA : view class methods in their real order

java - IntelliJ : How can I always show parameter hints?

testing - 主要项目代码覆盖率统计

tomcat - cobertura 的副作用

java - JUnit测试: How To Test If Statements Without Missing A Branch?

Grails 2.4.4 jdk8u60 SEVERE : Problems copying method. JVM 不兼容?

java - Intellij-IDEA gradle 模板