There are actually 5 options I can think of:
- Write a unit test (extends ESTestCase). These run in your IDE no problem.
- Write a semi-integration test (extends ESIntegTestCase). There also run in your IDE no problem.
- Use
gradle run --debug-jvm
. Forjvm-example
you need to dogradle :plugins:jvm-example:run --debug-jvm
. That will start Elasticsearch for remote debugging and wait until something connects on port 8000. You can just interact with Elasticsearch with CURL. - Write an integration test (extends ESRestTestCase). These run in your IDE by first starting Elasticsearch like in step 3 and adding
-Dtests.rest.cluster=localhost:9200
to the VM arguments for the test. - Run all the integration tests with
--debug-jvm
. It looks likegradle :plugins:jvm-example:integTest --debug-jvm
. This is just like number 3 except it kicks off the integration tests as soon as you unblock Elasticsearch.