# In memory testing with RestHighLevelClient

**URL:** <https://discuss.elastic.co/t/in-memory-testing-with-resthighlevelclient/106196>\
**Category:** Elasticsearch\
**Created:** [November 2, 2017, 12:42pm UTC](https://discuss.elastic.co/t/in-memory-testing-with-resthighlevelclient/106196 "2017-11-02T12:42:44Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 2, 2017, 3:45pm UTC](https://discuss.elastic.co/t/in-memory-testing-with-resthighlevelclient/106196/6 "2017-11-02T15:45:41Z")

</div>

> [@kieran](#):
>
> May I suggest that you consider providing some kind of support for embedded testing in a future release.

This will not happen.

To do integration tests, you can:

- ~~Use the Gradle tools elasticsearch already has. You can read some information about this here: [#21119](https://github.com/elastic/elasticsearch/issues/21119). This [sample project](https://github.com/joel-costigliola/elastic-search-test) shows how to use Elasticsearch Test Classes~~
- Use the Maven plugin: [GitHub - alexcojocaru/elasticsearch-maven-plugin: A Maven plugin to run a single node Elasticsearch cluster during the integration test phase of a build](https://github.com/alexcojocaru/elasticsearch-maven-plugin)
- Use Ant scripts like [https://david.pilato.fr/blog/2016-07-29-elasticsearch-real-integration-tests/](http://david.pilato.fr/blog/2016/10/18/elasticsearch-real-integration-tests-updated-for-ga/)
- Using Docker and TestContainers: [Elasticsearch container - Testcontainers for Java](https://www.testcontainers.org/modules/elasticsearch/)
- Using Docker from maven: [https://github.com/dadoonet/fscrawler/blob/e15dddf72b1ed094dad279d492e4e0314f73683f/pom.xml#L241-L289](https://github.com/dadoonet/fscrawler/blob/e15dddf72b1ed094dad279d492e4e0314f73683f/pom.xml#L241-L289)

For sure, integration tests must be run against a real elasticsearch instance.  
Unit tests should not require any third party tool to run IMHO.

---

_[View the full topic](https://discuss.elastic.co/t/in-memory-testing-with-resthighlevelclient/106196)._
