I'm building a plugin that exposes three REST endpoints by inheriting from the BaseRestHandler. I need to run integration tests to check the endpoints' functionality by sending requests and inspecting the responses.
I've seen some examples of using YAML API specs (e.g. the carrot2 plugin), but I haven't been able to find any documentation on how to implement these tests. For example, I haven't been able to find any docs for the
Moreover, the data being passed to/from my endpoints is such that building the request body and checking the response data would be much simpler to do programmatically than it would to define YAML files by hand.
So I'm leaning towards using Python to build requests, hit the endpoints, and check the responses. My main hesitation is that it wouldn't really integrate with the Gradle build setup. To test I would have to build the plugin, start an ES instance, install the plugin, and then run the tests. Of course that can be scripted, but it's still nice if this can leverage the existing Gradle setup.
Are there any guides to doing such integration testing? Is using Python for this purpose a decent approach? I appreciate any tips as I'm fairly new to plugin development for Elasticsearch.