Background
Working on a Java Gradle project with unit test.
Question
Want to see which tests are covering which lines of code. However, the icon "Show Tests Covering Line" in the code coverage result window was disabled. Already have “Branch Coverage” and “Track per test coverage” enabled under the menu File | Setting | Build, Execution, Deployment | Coverage.
Answer
This feature can only be used with the IDEA test runner but not the Gradle test runner.
Please click the menu File | Settings | Build, Execution, Deployment | Build Tools | Gradle, then switch Build and Run | Build and run using: and Run tests using: to IntelliJ IDEA , it will work as this:
Note: before changing this run option, the Gradle project must be loaded as a Gradle project and shown in the Gradle tool window.

Comments
0 comments
Please sign in to leave a comment.