[7.xUpdate TESTING.asciidoc for recent REST test changes (#62841) (#62895)

* Remove reference to Runner (no longer valid)
* Remove tests.rest (no longer valid)
* Add reference to javaRestTest
* Brief mention of qa tests
This commit is contained in:
Jake Landis 2020-10-01 11:02:29 -05:00 committed by GitHub
parent 0795f4b898
commit 294f40de72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 25 additions and 5 deletions

View File

@ -311,20 +311,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
@ -334,6 +333,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
Note that the REST tests, like all the integration tests, can be run against an external
cluster by specifying the `tests.cluster` property, which if present needs to contain a
comma separated list of nodes to connect to (e.g. localhost:9300). A transport client will