Is there a way to run all test in an root pom and collect test coverage in Intellij Idea ?
Coverage in the Coverage tool window If you want to reopen the Coverage tool window, select Run | Show Code Coverage Data from the main menu, or press Ctrl+Alt+F6 . The report shows the percentage of the code that has been executed or covered by tests.
From the main menu, select Run | Show Coverage Data ( Ctrl+Alt+F6 ). In the Choose Coverage Suite to Display dialog, select the checkboxes next to the necessary suites, and click Show selected. IntelliJ IDEA opens the coverage results for the selected test suites.
How to Calculate Test Coverage. Calculating test coverage is actually fairly easy. You can simply take the number of lines that are covered by a test (any kind of test, across your whole testing strategy) and divide by the total number of lines in your application.
Create a Run Configuration that will look for tests in the whole project. Make sure that you choose All in package
and In whole project
in the configurations dialog:
Make sure that you choose the <default>
package in the Choose Package
dialog.
Now you can select to run this configuration using Run 'All in project' with Coverage
:
The result will be presented in a separate coverate window:
And you will also see the result in the Project View
window for a fast overview:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With