2014-11-24 05:52:41 -05:00
|
|
|
[[Testing Framework Cheatsheet]]
|
|
|
|
= Testing
|
|
|
|
|
|
|
|
[partintro]
|
|
|
|
|
2016-06-17 11:53:55 -04:00
|
|
|
Elasticsearch and X-Pack use jUnit for testing, they also use randomness
|
2014-11-24 05:52:41 -05:00
|
|
|
in the tests, that can be set using a seed, please refer to the
|
|
|
|
Elasticsearch TESTING.asciidoc cheatsheet to know all about it.
|
|
|
|
|
|
|
|
Tests are executed with network transport and unicast discovery, as this is
|
2016-06-17 11:53:55 -04:00
|
|
|
the configuration that's secured by X-Pack.
|
2014-11-24 05:52:41 -05:00
|
|
|
|
|
|
|
== Testing the REST layer
|
|
|
|
|
2016-06-17 11:53:55 -04:00
|
|
|
The available integration tests are specific for Security functionalities
|
2014-11-24 05:52:41 -05:00
|
|
|
and make use of the java API to communicate with the elasticsearch nodes,
|
|
|
|
using the internal binary transport (port 9300 by default).
|
2016-06-17 11:53:55 -04:00
|
|
|
Security is also tested using the REST tests provided by Elasticsearch core,
|
|
|
|
just by running those same tests against a cluster with X-Pack installed.
|
2014-11-24 05:52:41 -05:00
|
|
|
|
2015-08-03 22:04:33 -04:00
|
|
|
The REST tests are run automatically during the integration test phase
|
2016-06-17 11:53:55 -04:00
|
|
|
(`gradle integTest`). Some tests are blacklisted as they are known to fail against
|
|
|
|
X-Pack due to different behaviours introduced by the security plugin.
|
2014-11-24 05:52:41 -05:00
|
|
|
|
|
|
|
---------------------------------------------------------------------------
|
2016-06-17 11:53:55 -04:00
|
|
|
gradle integTest
|
2014-11-24 05:52:41 -05:00
|
|
|
---------------------------------------------------------------------------
|
|
|
|
|
2016-06-17 11:53:55 -04:00
|
|
|
`XPackRestIT` is the executable test class that runs all the
|
2014-11-24 05:52:41 -05:00
|
|
|
yaml suites available within the `rest-api-spec` folder.
|
|
|
|
|