You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: TESTING.md
+29-3Lines changed: 29 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -518,22 +518,48 @@ Example:
518
518
519
519
# Test coverage analysis
520
520
521
-
The code coverage report can be generated through Gradle with [JaCoCo plugin](https://docs.gradle.org/current/userguide/jacoco_plugin.html).
521
+
The code coverage report can be generated through Gradle with [JaCoCo plugin](https://docs.gradle.org/current/userguide/jacoco_plugin.html). Following are some of the ways to generate the code coverage reports locally.
To generate coverage report for the combined tests after `check` task:
533
559
534
560
./gradlew check -Dtests.coverage=true
535
561
536
-
The code coverage report will be generated in `build/codeCoverageReport`, `build/codeCoverageReportForUnitTest` or `build/codeCoverageReportForIntegrationTest` correspondingly.
562
+
The code coverage report will be generated in `$buildDir/build/reports/jacoco/test/html/`.
537
563
538
564
The report will be in XML format only by default, but you can add the following parameter for HTML and CSV format.
539
565
@@ -543,7 +569,7 @@ The report will be in XML format only by default, but you can add the following
543
569
544
570
For example, to generate code coverage report in HTML format and not in XML format:
Apart from using Gradle, it is also possible to gain insight in code coverage using IntelliJ’s built-in coverage analysis tool that can measure coverage upon executing specific tests. Eclipse may also be able to do the same using the EclEmma plugin.
0 commit comments