|
@@ -308,20 +308,19 @@ The REST tests are run automatically when executing the "./gradlew check" comman
|
|
|
YAML REST tests use the following command (modules and plugins may also include YAML REST tests):
|
|
|
|
|
|
---------------------------------------------------------------------------
|
|
|
-./gradlew :rest-api-spec:yamlRestTest
|
|
|
+./gradlew :rest-api-spec:yamlRestTest
|
|
|
---------------------------------------------------------------------------
|
|
|
|
|
|
A specific test case can be run with the following command:
|
|
|
|
|
|
---------------------------------------------------------------------------
|
|
|
-./gradlew ':rest-api-spec:yamlRestTestRunner' \
|
|
|
+./gradlew ':rest-api-spec:yamlRestTest' \
|
|
|
--tests "org.elasticsearch.test.rest.ClientYamlTestSuiteIT" \
|
|
|
- -Dtests.method="test {p0=cat.segments/10_basic/Help}"
|
|
|
+ -Dtests.method="test {p0=cat.segments/10_basic/Help}"
|
|
|
---------------------------------------------------------------------------
|
|
|
|
|
|
-The REST tests support all the options provided by the randomized runner, plus the following:
|
|
|
+The YAML REST tests support all the options provided by the randomized runner, plus the following:
|
|
|
|
|
|
-* `tests.rest[true|false]`: determines whether the REST tests need to be run (default) or not.
|
|
|
* `tests.rest.suite`: comma separated paths of the test suites to be run
|
|
|
(by default loaded from /rest-api-spec/test). It is possible to run only a subset
|
|
|
of the tests providing a sub-folder or even a single yaml file (the default
|
|
@@ -331,6 +330,27 @@ e.g. -Dtests.rest.suite=index,get,create/10_with_id
|
|
|
blacklisted and need to be skipped
|
|
|
e.g. -Dtests.rest.blacklist=index/*/Index document,get/10_basic/*
|
|
|
|
|
|
+Java REST tests can be run with the "javaRestTest" task.
|
|
|
+
|
|
|
+For example :
|
|
|
+---------------------------------------------------------------------------
|
|
|
+./gradlew :modules:mapper-extras:javaRestTest
|
|
|
+---------------------------------------------------------------------------
|
|
|
+
|
|
|
+A specific test case can be run with the following syntax (fqn.test {params}):
|
|
|
+
|
|
|
+---------------------------------------------------------------------------
|
|
|
+./gradlew ':modules:mapper-extras:javaRestTest' \
|
|
|
+ --tests "org.elasticsearch.index.mapper.TokenCountFieldMapperIntegrationIT.testSearchByTokenCount {storeCountedFields=true loadCountedFields=false}"
|
|
|
+---------------------------------------------------------------------------
|
|
|
+
|
|
|
+yamlRestTest's and javaRestTest's are easy to identify, since they are found in a
|
|
|
+respective source directory. However, there are some more specialized REST tests
|
|
|
+that use custom task names. These are usually found in "qa" projects commonly
|
|
|
+use the "integTest" task.
|
|
|
+
|
|
|
+If in doubt about which command to use, simply run <gradle path>:check
|
|
|
+
|
|
|
== Testing packaging
|
|
|
|
|
|
The packaging tests use Vagrant virtual machines or cloud instances to verify
|