Fix coverage analysis. Two versions of jacoco were being used and creating jar hell
This commit is contained in:
parent
45ad47581d
commit
0e0fef81b2
|
@ -81,15 +81,15 @@ You can also filter tests by certain annotations ie:
|
||||||
Those annotation names can be combined into a filter expression like:
|
Those annotation names can be combined into a filter expression like:
|
||||||
|
|
||||||
------------------------------------------------
|
------------------------------------------------
|
||||||
mvn test -Dtests.filter="@nightly and not @slow"
|
mvn test -Dtests.filter="@nightly and not @backwards"
|
||||||
------------------------------------------------
|
------------------------------------------------
|
||||||
|
|
||||||
to run all nightly test but not the ones that are slow. `tests.filter` supports
|
to run all nightly test but not the ones that are backwards tests. `tests.filter` supports
|
||||||
the boolean operators `and, or, not` and grouping ie:
|
the boolean operators `and, or, not` and grouping ie:
|
||||||
|
|
||||||
|
|
||||||
---------------------------------------------------------------
|
---------------------------------------------------------------
|
||||||
mvn test -Dtests.filter="@nightly and not(@slow or @backwards)"
|
mvn test -Dtests.filter="@nightly and not(@badapple or @backwards)"
|
||||||
---------------------------------------------------------------
|
---------------------------------------------------------------
|
||||||
|
|
||||||
=== Seed and repetitions.
|
=== Seed and repetitions.
|
||||||
|
@ -145,7 +145,6 @@ Default value provided below in [brackets].
|
||||||
mvn test -Dtests.nightly=[false] - nightly test group (@Nightly)
|
mvn test -Dtests.nightly=[false] - nightly test group (@Nightly)
|
||||||
mvn test -Dtests.weekly=[false] - weekly tests (@Weekly)
|
mvn test -Dtests.weekly=[false] - weekly tests (@Weekly)
|
||||||
mvn test -Dtests.awaitsfix=[false] - known issue (@AwaitsFix)
|
mvn test -Dtests.awaitsfix=[false] - known issue (@AwaitsFix)
|
||||||
mvn test -Dtests.slow=[true] - slow tests (@Slow)
|
|
||||||
------------------------------------------------------------------
|
------------------------------------------------------------------
|
||||||
|
|
||||||
=== Load balancing and caches.
|
=== Load balancing and caches.
|
||||||
|
@ -246,6 +245,21 @@ $ curl -O https://download.elasticsearch.org/elasticsearch/elasticsearch/elastic
|
||||||
$ tar -xzf elasticsearch-1.2.1.tar.gz
|
$ tar -xzf elasticsearch-1.2.1.tar.gz
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
== Running integration tests
|
||||||
|
|
||||||
|
To run the integration tests:
|
||||||
|
|
||||||
|
---------------------------------------------------------------------------
|
||||||
|
mvn verify
|
||||||
|
---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Note that this will also run the unit tests first. If you want to just
|
||||||
|
run the integration tests only (because you are debugging them):
|
||||||
|
|
||||||
|
---------------------------------------------------------------------------
|
||||||
|
mvn verify -Dskip.unit.tests
|
||||||
|
---------------------------------------------------------------------------
|
||||||
|
|
||||||
== Testing the REST layer
|
== Testing the REST layer
|
||||||
|
|
||||||
The available integration tests make use of the java API to communicate with
|
The available integration tests make use of the java API to communicate with
|
||||||
|
@ -262,7 +276,7 @@ REST tests use the following command:
|
||||||
mvn verify -Dtests.filter="@Rest"
|
mvn verify -Dtests.filter="@Rest"
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
|
|
||||||
`ElasticsearchRestTests` is the executable test class that runs all the
|
`RestNIT` are the executable test classes that runs all the
|
||||||
yaml suites available within the `rest-api-spec` folder.
|
yaml suites available within the `rest-api-spec` folder.
|
||||||
|
|
||||||
The REST tests support all the options provided by the randomized runner, plus the following:
|
The REST tests support all the options provided by the randomized runner, plus the following:
|
||||||
|
@ -319,3 +333,12 @@ ES_CLEAN_BEFORE_TEST=true bats 30_deb_package.bats
|
||||||
The current mode of execution is to copy all the packages that should be tested
|
The current mode of execution is to copy all the packages that should be tested
|
||||||
into one directory, then copy the bats files into the same directory and run
|
into one directory, then copy the bats files into the same directory and run
|
||||||
those.
|
those.
|
||||||
|
|
||||||
|
== Coverage analysis
|
||||||
|
|
||||||
|
To run tests instrumented with jacoco and produce a coverage report in
|
||||||
|
`target/site/jacoco/`:
|
||||||
|
|
||||||
|
---------------------------------------------------------------------------
|
||||||
|
mvn -Dtests.coverage test jacoco:report
|
||||||
|
---------------------------------------------------------------------------
|
||||||
|
|
20
pom.xml
20
pom.xml
|
@ -47,6 +47,7 @@
|
||||||
<jackson.version>2.5.3</jackson.version>
|
<jackson.version>2.5.3</jackson.version>
|
||||||
<slf4j.version>1.6.2</slf4j.version>
|
<slf4j.version>1.6.2</slf4j.version>
|
||||||
<log4j.version>1.2.17</log4j.version>
|
<log4j.version>1.2.17</log4j.version>
|
||||||
|
<jacoco.version>0.7.2.201409121644</jacoco.version>
|
||||||
|
|
||||||
<!-- Build resources properties -->
|
<!-- Build resources properties -->
|
||||||
<elasticsearch.tools.directory>${project.build.directory}/dev-tools</elasticsearch.tools.directory>
|
<elasticsearch.tools.directory>${project.build.directory}/dev-tools</elasticsearch.tools.directory>
|
||||||
|
@ -451,14 +452,6 @@
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- For coverage analysis -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jacoco</groupId>
|
|
||||||
<artifactId>org.jacoco.agent</artifactId>
|
|
||||||
<classifier>runtime</classifier>
|
|
||||||
<version>0.6.4.201312101107</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</dependencyManagement>
|
</dependencyManagement>
|
||||||
|
|
||||||
|
@ -1073,7 +1066,7 @@ org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UT
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.jacoco</groupId>
|
<groupId>org.jacoco</groupId>
|
||||||
<artifactId>jacoco-maven-plugin</artifactId>
|
<artifactId>jacoco-maven-plugin</artifactId>
|
||||||
<version>0.7.2.201409121644</version>
|
<version>${jacoco.version}</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>default-prepare-agent</id>
|
<id>default-prepare-agent</id>
|
||||||
|
@ -1400,15 +1393,6 @@ org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UT
|
||||||
<value>true</value>
|
<value>true</value>
|
||||||
</property>
|
</property>
|
||||||
</activation>
|
</activation>
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<!-- must be on the classpath -->
|
|
||||||
<groupId>org.jacoco</groupId>
|
|
||||||
<artifactId>org.jacoco.agent</artifactId>
|
|
||||||
<classifier>runtime</classifier>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
<properties>
|
<properties>
|
||||||
<tests.security.manager>false</tests.security.manager> <!-- security policy doesn't have appropriate permissions for instrumentation -->
|
<tests.security.manager>false</tests.security.manager> <!-- security policy doesn't have appropriate permissions for instrumentation -->
|
||||||
</properties>
|
</properties>
|
||||||
|
|
Loading…
Reference in New Issue