On Sat, May 5, 2018 at 5:55 PM Konrad Windszus <konra...@gmx.de> wrote:
> Hi, > since in general I very much like to keep related things together in most > of the cases want to execute the IT in the same Maven module where the > actual implementation is. > > Therefore, teleporter rules are very handy, because they transparently > create bundles only for the IT purpose and execute them remotely. > But sometimes I want to cover in the IT also the request starting on the > client side, e.g. to check if a certain servlet/script is correctly > deployed. > > How can I combine these two approaches to have a special servlet only > necessary for the IT (not part of the actual code) transparently deployed > as dedicated test bundle and call that then from my test with an http > client? > These are the steps which would be necessary: > 1. create and deploy the test bundle containing my servlet with the > teleporter > 2. execute the IT leveraging an HTTP client to send a request to the > previously deployed servlet > 3. uninstall the test bundle > > Any ideas how to accomplish that with either the existing teleporter rules > or a small extension of them? > > Thanks, > Konrad > > Hi Konrad, I've done something similar in the QueryClient [1] (sling-testing-tools), where a query servlet is installed on the fly when it's needed. For that I've used TinyBundles directly. [1] https://github.com/apache/sling-org-apache-sling-testing-clients/blob/master/src/main/java/org/apache/sling/testing/clients/query/QueryClient.java HTH, Valentin