mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-27 23:49:13 +00:00
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.
This commit is contained in:
parent
7df66abaf5
commit
67a6a76aad
@ -499,32 +499,21 @@ will contain your change.
|
|||||||
. Push both branches to your remote repository.
|
. Push both branches to your remote repository.
|
||||||
. Run the tests with `./gradlew check -Dtests.bwc.remote=${remote} -Dtests.bwc.refspec=index_req_bwc_5.x`.
|
. Run the tests with `./gradlew check -Dtests.bwc.remote=${remote} -Dtests.bwc.refspec=index_req_bwc_5.x`.
|
||||||
|
|
||||||
== Coverage analysis
|
== Test coverage analysis
|
||||||
|
|
||||||
Tests can be run instrumented with jacoco to produce a coverage report in
|
Generating test coverage reports for Elasticsearch is currently not possible through Gradle.
|
||||||
`target/site/jacoco/`.
|
However, it _is_ 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.
|
||||||
|
|
||||||
Unit test coverage:
|
Test coverage reporting used to be possible with JaCoCo when Elasticsearch was using Maven
|
||||||
|
as its build system. Since the switch to Gradle though, this is no longer possible, seeing as
|
||||||
---------------------------------------------------------------------------
|
the code currently used to build Elasticsearch does not allow JaCoCo to recognize its tests.
|
||||||
mvn -Dtests.coverage test jacoco:report
|
For more information on this, see the discussion in https://github.com/elastic/elasticsearch/issues/28867[issue #28867].
|
||||||
---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Integration test coverage:
|
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
|
||||||
mvn -Dtests.coverage -Dskip.unit.tests verify jacoco:report
|
|
||||||
---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Combined (Unit+Integration) coverage:
|
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
|
||||||
mvn -Dtests.coverage verify jacoco:report
|
|
||||||
---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
== Launching and debugging from an IDE
|
== Launching and debugging from an IDE
|
||||||
|
|
||||||
If you want to run elasticsearch from your IDE, the `./gradlew run` task
|
If you want to run Elasticsearch from your IDE, the `./gradlew run` task
|
||||||
supports a remote debugging option:
|
supports a remote debugging option:
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user