# Help needed with using ESTestCase

**URL:** <https://discuss.elastic.co/t/help-needed-with-using-estestcase/134817>\
**Category:** Elasticsearch\
**Created:** [June 6, 2018, 1:32pm UTC](https://discuss.elastic.co/t/help-needed-with-using-estestcase/134817 "2018-06-06T13:32:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bacem.hagui](https://avatars.discourse-cdn.com/v4/letter/b/dc4da7/32.png) [@bacem.hagui](https://discuss.elastic.co/u/bacem.hagui)\
**Post date:** [June 6, 2018, 1:32pm UTC](https://discuss.elastic.co/t/help-needed-with-using-estestcase/134817/1 "2018-06-06T13:32:53Z")

</div>

I am trying to perform unit tests on ElasticSearch methods written in Java. My methods are composed of a query builder and then a parser for the json reply received from the server after the query is received.  
I would like to test these methods and the results in the replies they give me by creating a local in-memory elasticsearch server which will be populated by a file containing a limited amount of data.  
My ES version is 5.6.8 so i know that running an embedded server is no longer supported and that I should use ESTestCase for unit testing. I was unfortunately unable to find any working examples or tutorials to perform what I am trying to do.

I am a beginner so a working example will be very much appreciated.

---

<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:** [June 6, 2018, 3:53pm UTC](https://discuss.elastic.co/t/help-needed-with-using-estestcase/134817/2 "2018-06-06T15:53:59Z")

</div>

I shared some ideas about integration testing at [In memory testing with RestHighLevelClient](https://discuss.elastic.co/t/in-memory-testing-with-resthighlevelclient/106196/6)

HTH

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 4, 2018, 3:54pm UTC](https://discuss.elastic.co/t/help-needed-with-using-estestcase/134817/3 "2018-07-04T15:54:11Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
