# Create tests with ES mock (/ in memory)

**URL:** <https://discuss.elastic.co/t/create-tests-with-es-mock-in-memory/230871>\
**Category:** Elasticsearch\
**Created:** [May 3, 2020, 12:21pm UTC](https://discuss.elastic.co/t/create-tests-with-es-mock-in-memory/230871 "2020-05-03T12:21:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![AsfK](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/asfk/32/58995_2.png) [@AsfK](https://discuss.elastic.co/u/AsfK)\
**Post date:** [May 3, 2020, 12:21pm UTC](https://discuss.elastic.co/t/create-tests-with-es-mock-in-memory/230871/1 "2020-05-03T12:21:23Z")

</div>

Hello!

We're using ES 7.6.2 (pull document and upload bulks).  
And we want to create tests, as data is upload correctly, simulate situations where the bulk (/ connection, etc.) is failed.

I found old [reference](https://stackoverflow.com/questions/47466064/in-memory-elastic-search) to Elastic In memory that it's not supported at the answer time (2017)  
And I want to ask if it's support toady, in the latest version? if not, does there is another way to mock ES?

Thank you!!

---

<div class="post-metadata">

**Author:** ![AsfK](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/asfk/32/58995_2.png) [@AsfK](https://discuss.elastic.co/u/AsfK)\
**Post date:** [May 4, 2020, 2:55pm UTC](https://discuss.elastic.co/t/create-tests-with-es-mock-in-memory/230871/2 "2020-05-04T14:55:03Z")

</div>

Someone? Thanks

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [May 4, 2020, 3:03pm UTC](https://discuss.elastic.co/t/create-tests-with-es-mock-in-memory/230871/3 "2020-05-04T15:03:51Z")

</div>

No, this kind of mock is not provided. I'd recommend using a real cluster so that you get the real behaviour rather than trying to build such a mock.

---

<div class="post-metadata">

**Author:** ![AsfK](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/asfk/32/58995_2.png) [@AsfK](https://discuss.elastic.co/u/AsfK)\
**Post date:** [May 4, 2020, 3:31pm UTC](https://discuss.elastic.co/t/create-tests-with-es-mock-in-memory/230871/4 "2020-05-04T15:31:46Z")

</div>

Thank you very much!

---

<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:** [June 1, 2020, 3:31pm UTC](https://discuss.elastic.co/t/create-tests-with-es-mock-in-memory/230871/5 "2020-06-01T15:31:54Z")

</div>

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