Skip to content

Commit 89cd269

Browse files
bvobartnik9000
authored andcommitted
Docs: Update generating test coverage reports (#29255)
Old docs said to use maven. That doesn't work. We can't generate the reports right now.
1 parent ac257a8 commit 89cd269

File tree

1 file changed

+10
-21
lines changed

1 file changed

+10
-21
lines changed

TESTING.asciidoc

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -499,32 +499,21 @@ will contain your change.
499499
. Push both branches to your remote repository.
500500
. Run the tests with `./gradlew check -Dtests.bwc.remote=${remote} -Dtests.bwc.refspec=index_req_bwc_5.x`.
501501

502-
== Coverage analysis
502+
== Test coverage analysis
503503

504-
Tests can be run instrumented with jacoco to produce a coverage report in
505-
`target/site/jacoco/`.
504+
Generating test coverage reports for Elasticsearch is currently not possible through Gradle.
505+
However, it _is_ possible to gain insight in code coverage using IntelliJ's built-in coverage
506+
analysis tool that can measure coverage upon executing specific tests. Eclipse may also be able
507+
to do the same using the EclEmma plugin.
506508

507-
Unit test coverage:
508-
509-
---------------------------------------------------------------------------
510-
mvn -Dtests.coverage test jacoco:report
511-
---------------------------------------------------------------------------
512-
513-
Integration test coverage:
514-
515-
---------------------------------------------------------------------------
516-
mvn -Dtests.coverage -Dskip.unit.tests verify jacoco:report
517-
---------------------------------------------------------------------------
518-
519-
Combined (Unit+Integration) coverage:
520-
521-
---------------------------------------------------------------------------
522-
mvn -Dtests.coverage verify jacoco:report
523-
---------------------------------------------------------------------------
509+
Test coverage reporting used to be possible with JaCoCo when Elasticsearch was using Maven
510+
as its build system. Since the switch to Gradle though, this is no longer possible, seeing as
511+
the code currently used to build Elasticsearch does not allow JaCoCo to recognize its tests.
512+
For more information on this, see the discussion in https://github.com/elastic/elasticsearch/issues/28867[issue #28867].
524513

525514
== Launching and debugging from an IDE
526515

527-
If you want to run elasticsearch from your IDE, the `./gradlew run` task
516+
If you want to run Elasticsearch from your IDE, the `./gradlew run` task
528517
supports a remote debugging option:
529518

530519
---------------------------------------------------------------------------

0 commit comments

Comments
 (0)