Hello Wilfried,

On Jun 20, 2013, at 10:57 AM, <[email protected]> wrote:

> I want to play a little bit around with the JAVA client API (and of course 
> with its implementation).
> 
> Is there a way to test the API without an OSGi container?

Currently, no. The API is basically a set of OSGi services, so you need to be 
in a container to talk to it. That is also how the Web UI and REST client API 
are built on top of the client API.

> It would be nice to start with writing a simple JUnit test case etc.
> But I assume, that this isn't possible that simple.

It would always be an "integration test" because you need both the client API 
and a server running somewhere (to checkout from and commit to). You could 
indeed, as Karl suggests, try to use the "all in one" server with PojoSR if you 
really want to run it outside of an OSGi container, but you might as well just 
setup an integration test then.

> Does anyone has a recommendation for this "play case"??

I would just write a bundle that talks to the client API, and run all of that 
in Eclipse with Bndtools. Then you can just write code and immediately test it.

Another option, in the future, would be to leverage the GoGo shell and write 
scripts for that. I'm currently toying around with that on my local machine, 
but I intend to commit that work soon. What you can do yourself is also write 
your test code as one or more shell commands, so you can quickly and 
interactively run such code from the shell.

Greetings, Marcel

Reply via email to