You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[7.6] Updates to TESTING.asciidoc for REST testing (#52862) (#52900)
Update documentation for:
* restResources config (related #52114)
* call out YAML vs. Java based Rest tests
* update example to use newer syntax
* update example to target a test that is not skipped
* provide example for bwcRest test (related #52383)
Copy file name to clipboardExpand all lines: TESTING.asciidoc
+42-18Lines changed: 42 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -273,34 +273,49 @@ test fixtures. If it's not present those checks will be skipped automatically.
273
273
274
274
== Testing the REST layer
275
275
276
-
The available integration tests make use of the java API to communicate with
277
-
the elasticsearch nodes, using the internal binary transport (port 9300 by
278
-
default).
279
-
The REST layer is tested through specific tests that are shared between all
280
-
the elasticsearch official clients and consist of YAML files that describe the
276
+
The REST layer is tested through specific tests that are executed against
277
+
a cluster that is configured and initialized via Gradle. The tests
278
+
themselves can be written in either Java or with a YAML based DSL.
279
+
280
+
YAML based REST tests should be preferred since these are shared between all
281
+
the elasticsearch official clients. The YAML based tests describe the
281
282
operations to be executed and the obtained results that need to be tested.
282
283
283
-
The YAML files support various operators defined in the link:/rest-api-spec/src/main/resources/rest-api-spec/test/README.asciidoc[rest-api-spec] and adhere to the link:/rest-api-spec/README.markdown[Elasticsearch REST API JSON specification]
284
+
The YAML tests support various operators defined in the link:/rest-api-spec/src/main/resources/rest-api-spec/test/README.asciidoc[rest-api-spec] and adhere to the link:/rest-api-spec/README.markdown[Elasticsearch REST API JSON specification]
285
+
In order to run the the YAML tests, the relevant API specification needs
286
+
to be on the test classpath. Any gradle project that has support for REST
287
+
tests will get the primary API on it's class path. However, to better support
288
+
Gradle incremental builds, it is recommended to explicitly declare which
0 commit comments