# Using elasticsearch test classes for plugin development

**URL:** <https://discuss.elastic.co/t/using-elasticsearch-test-classes-for-plugin-development/10493>\
**Category:** Elasticsearch\
**Created:** [January 24, 2013, 4:34pm UTC](https://discuss.elastic.co/t/using-elasticsearch-test-classes-for-plugin-development/10493 "2013-01-24T16:34:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alan\_Woodward](https://avatars.discourse-cdn.com/v4/letter/a/5f8ce5/32.png) [@Alan\_Woodward](https://discuss.elastic.co/u/Alan_Woodward)\
**Post date:** [January 24, 2013, 4:34pm UTC](https://discuss.elastic.co/t/using-elasticsearch-test-classes-for-plugin-development/10493/1 "2013-01-24T16:34:00Z")

</div>

Hi all,

The elasticsearch core tests have a bunch of very nice supporting classes, things like AbstractNodesTest, that make it easy to test stuff end-to-end via the Java client API. Is there anyway of exposing these for plugin development? Being test classes, they're not included in the default jar.

Thanks,

Alan Woodward

> **[Open Source Search Consultants | Lucene/Solr | Elasticsearch](http://www.flax.co.uk)**
>
> Flax provides consulting services for open source search engines Lucene / Solr & Elasticsearch, Hadoop, Kafka, Samza, Logstash, Kibana

--

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [January 24, 2013, 6:09pm UTC](https://discuss.elastic.co/t/using-elasticsearch-test-classes-for-plugin-development/10493/2 "2013-01-24T18:09:41Z")

</div>

Hi Alan,

I'm afraid the only method applicable now is copy&paste. But it's a good  
idea if a test framework jar was provided, with annotations and the like.

Best regards,

Jörg

On Thursday, January 24, 2013 5:34:00 PM UTC+1, Alan Woodward wrote:

> Hi all,
> 
> The elasticsearch core tests have a bunch of very nice supporting classes,  
> things like AbstractNodesTest, that make it easy to test stuff end-to-end  
> via the Java client API. Is there anyway of exposing these for plugin  
> development? Being test classes, they're not included in the default jar.
> 
> Thanks,
> 
> Alan Woodward  
> [www.flax.co.uk](http://www.flax.co.uk)

--

---

<div class="post-metadata">

**Author:** ![Tanguy1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tanguy1/32/1749_2.png) [@Tanguy1](https://discuss.elastic.co/u/Tanguy1)\
**Post date:** [January 25, 2013, 8:42am UTC](https://discuss.elastic.co/t/using-elasticsearch-test-classes-for-plugin-development/10493/3 "2013-01-25T08:42:32Z")

</div>

Hi Alan,

I developped a small testing framework for elasticsearch, with annotations  
and utility classes: [GitHub - tlrx/elasticsearch-test: elasticsearch-test, a framework that makes elasticsearch unit testing a breeze.](https://github.com/tlrx/elasticsearch-test)

It is used on several projects and works well. You can see an example class  
using the EsSetpup object here;  
[https://github.com/tlrx/elasticsearch-test/blob/master/src/test/java/com/github/tlrx/elasticsearch/test/BasicTest.java](https://github.com/tlrx/elasticsearch-test/blob/master/src/test/java/com/github/tlrx/elasticsearch/test/BasicTest.java)

I'd love to see something similar provided by elasticsearch team.

-- Tanguy  
@tlrx

Le jeudi 24 janvier 2013 17:34:00 UTC+1, Alan Woodward a écrit :

> Hi all,
> 
> The elasticsearch core tests have a bunch of very nice supporting classes,  
> things like AbstractNodesTest, that make it easy to test stuff end-to-end  
> via the Java client API. Is there anyway of exposing these for plugin  
> development? Being test classes, they're not included in the default jar.
> 
> Thanks,
> 
> Alan Woodward  
> [www.flax.co.uk](http://www.flax.co.uk)

--

---

<div class="post-metadata">

**Author:** ![Alan\_Woodward](https://avatars.discourse-cdn.com/v4/letter/a/5f8ce5/32.png) [@Alan\_Woodward](https://discuss.elastic.co/u/Alan_Woodward)\
**Post date:** [January 25, 2013, 9:29am UTC](https://discuss.elastic.co/t/using-elasticsearch-test-classes-for-plugin-development/10493/4 "2013-01-25T09:29:40Z")

</div>

This looks perfect. Thanks, Tanguy!

On 25 Jan 2013, at 08:42, Tanguy wrote:

> Hi Alan,
> 
> I developped a small testing framework for elasticsearch, with annotations and utility classes: [GitHub - tlrx/elasticsearch-test: elasticsearch-test, a framework that makes elasticsearch unit testing a breeze.](https://github.com/tlrx/elasticsearch-test)
> 
> It is used on several projects and works well. You can see an example class using the EsSetpup object here;  
> [https://github.com/tlrx/elasticsearch-test/blob/master/src/test/java/com/github/tlrx/elasticsearch/test/BasicTest.java](https://github.com/tlrx/elasticsearch-test/blob/master/src/test/java/com/github/tlrx/elasticsearch/test/BasicTest.java)
> 
> I'd love to see something similar provided by elasticsearch team.
> 
> -- Tanguy  
> @tlrx
> 
> Le jeudi 24 janvier 2013 17:34:00 UTC+1, Alan Woodward a écrit :  
> Hi all,
> 
> The elasticsearch core tests have a bunch of very nice supporting classes, things like AbstractNodesTest, that make it easy to test stuff end-to-end via the Java client API. Is there anyway of exposing these for plugin development? Being test classes, they're not included in the default jar.
> 
> Thanks,
> 
> Alan Woodward  
> [www.flax.co.uk](http://www.flax.co.uk)
> 
> --

---

<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 6, 2017, 2:54am UTC](https://discuss.elastic.co/t/using-elasticsearch-test-classes-for-plugin-development/10493/5 "2017-07-06T02:54:39Z")

</div>


