Hi all, Thanks for the links and references. I looked in to the integration tests since eventually that is the place I should be adding the Cassandra Provider. I looked inside the Test classes and base tests. The integration tests calls to HTTP REST endpoints. So there should be a place that I should be writing something like JAX-RS using sling APIs . (ResourceProviders and etc) ? Or am I missing something in understanding this? Hi Ian, Since my next step is to test this within sling runtime, what is the best way to access my provider and read resources ? Apparently what I should be writing is something similar to PlanetsResourceProviderTest.
On Fri, Aug 9, 2013 at 12:53 PM, Bertrand Delacretaz <[email protected] > wrote: > Hi, > > On Fri, Aug 9, 2013 at 5:28 AM, Dishara Wijewardana > <[email protected]> wrote: > > ...Can we access sling resources from a java client ? Is there any > > sample/links to refer ?.. > > Besides the POST servlets docs mentioned by Shashank, this has the basics: > > http://sling.apache.org/documentation/getting-started/discover-sling-in-15-minutes.html > > > This is just to test the Cassandra impl on Sling... > > Most of our integration tests under launchpad/integration-tests use > HTTP requests to test a Sling instance, that's probably what you want. > > However, in the meantime we have a more modern test framework that's > demonstrated at testing/samples/integration-tests, you might want to > have a look as well. Radu has been using that in his validation module > (it-http module in org.apache.sling.validation-2.zip patch in > SLING-2803), I like how that makes integration tests local to a single > module or small group of modules, that's probably a good choice in > your case. > > See also > http://sling.apache.org/documentation/tutorials-how-tos/testing-sling-based-applications.html > for thoughts and best practices about testing. > > HTH, > -Bertrand > -- Thanks /Dishara
