Using the elasticsearch test classesedit

First, you need to include the testing dependency in your project, along with the elasticsearch dependency you have already added. If you use maven and its pom.xml file, it looks like this


Replace the elasticsearch version and the lucene version with the corresponding elasticsearch version and its accompanying lucene release.

We provide a few classes that you can inherit from in your own test classes which provide:

  • pre-defined loggers
  • randomized testing infrastructure
  • a number of helper methods