Hi Nicolas,

then you are looking for this:
https://ops4j1.jira.com/wiki/display/PAXEXAM4/Server+Mode

@toni, it's already available ;)

regards, Achim


2017-08-08 9:38 GMT+02:00 Nicolas Brasey <nicolas.bra...@gmail.com>:

> Hi Achim,
>
> No, I'm not so much interested to test the OSGi mechanics, I want to have
> high level business tests on our business layer which is a set of OSGi
> services. This requires the database and the messaging system to run as
> well.
>
> In fact, our app provides only rest api's from outside, and we have
> already a set of mocha integration tests. Mocha is fine for testing rest
> message structure and non-regression at the level but a little cumbersome
> and hard to maintain when it comes to test more complicated business
> scenarios. That is why I'm looking for a Java API in order to implement
> those tests, pax-exam is ideal for me in that context.
>
> Cheers,
> Nicolas
>
>
>
>
> On Tue, Aug 8, 2017 at 8:29 AM, 'Achim Nierbeck' via OPS4J <
> ops4j@googlegroups.com> wrote:
>
>> Hi,
>>
>> just one question came to my mind, regarding your scenario.
>> For your Integration tests you don't seem to rely on testing the
>> internals of the OSGi container, right?
>> In that case how about starting the Pax Exam tests as server tests, that
>> way you only need to call externally available interfaces and can make sure
>> you have neo4j started prior to that.
>>
>> regards, Achim
>>
>>
>> 2017-08-07 11:14 GMT+02:00 Nicolas Brasey <nicolas.bra...@gmail.com>:
>>
>>> Hi Christoph,
>>>
>>> Yes, that is exactly what I tried already, to bundle neo4j and all the
>>> dependencies with the maven shade plugin (like the ones in service mix
>>> bundles). I realized that this is not really ideal for the following
>>> reasons:
>>>
>>> 1) The build time exploded, to create this huge jar takes more than
>>> 1minutes and 30 secs
>>> 2) The pom.xml is far from being straight forward to write, you need to
>>> have a good understanding of the internal structure of neo4j in order to
>>> maintain it. Also, I'm afraid this is time consuming on the long term and
>>> will requires tricky changes for each major release of neo4j.
>>> 3) It was not even working! I had issues with neo4j internal way of
>>> loading modules with the java 6 ServiceLoader mechanism, which did not find
>>> http services for reasons I still ignore...
>>>
>>> Anyway, I finally gave up fighting with it ;-)
>>>
>>>
>>>
>>>
>>>
>>> On Sat, Aug 5, 2017 at 1:50 PM, 'Christoph Läubrich' via OPS4J <
>>> ops4j@googlegroups.com> wrote:
>>>
>>>> Even though neo4j is not "osgi-friendly" (what ever that means ;-) you
>>>> can create abundle that embedds all that neo4j requires, add an Activator
>>>> that starts up your db and provide a custom service to trigger
>>>> "after-test-checks" in whatever way you need. In your test you can the
>>>> collect the service to
>>>>
>>>> a) make sure the db is up and running
>>>> b) fire your checks whenever needed
>>>>
>>>> Am 04.08.2017 11:59, schrieb Nicolas Brasey:
>>>>
>>>> Hi,
>>>>
>>>> Context: I want to use pax-exam for our business integration tests that
>>>> needs to have a database (neo4j) that is not OSGi friendly running before
>>>> the test are executed. we use maven.
>>>>
>>>> Also, neo4j provides a embedded server that works extremely well
>>>> outside of an OSGi container, but I can't find a way to start this embedded
>>>> server with pax-exam outside of the container before the pax-exam machinery
>>>> is starting.
>>>>
>>>> The idea is to start the database in the non-OSGi context when the
>>>> pax-runner is starting, something like the beforeClass, and stop the
>>>> database after all the tests are finished ala afterClass.
>>>>
>>>> Does anyone has an idea how to do this ?
>>>>
>>>> Thanks
>>>> Nicolas
>>>> --
>>>> --
>>>> ------------------
>>>> OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
>>>>
>>>> ---
>>>> You received this message because you are subscribed to the Google
>>>> Groups "OPS4J" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to ops4j+unsubscr...@googlegroups.com.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>>
>>>> --
>>>> --
>>>> ------------------
>>>> OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
>>>>
>>>> ---
>>>> You received this message because you are subscribed to a topic in the
>>>> Google Groups "OPS4J" group.
>>>> To unsubscribe from this topic, visit https://groups.google.com/d/to
>>>> pic/ops4j/RlgwSX04-O8/unsubscribe.
>>>> To unsubscribe from this group and all its topics, send an email to
>>>> ops4j+unsubscr...@googlegroups.com.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>> --
>>> --
>>> ------------------
>>> OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
>>>
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "OPS4J" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to ops4j+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>>
>> Apache Member
>> Apache Karaf <http://karaf.apache.org/> Committer & PMC
>> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer
>> & Project Lead
>> blog <http://notizblog.nierbeck.de/>
>> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
>>
>> Software Architect / Project Manager / Scrum Master
>>
>> --
>> --
>> ------------------
>> OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
>>
>> ---
>> You received this message because you are subscribed to a topic in the
>> Google Groups "OPS4J" group.
>> To unsubscribe from this topic, visit https://groups.google.com/d/to
>> pic/ops4j/RlgwSX04-O8/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> ops4j+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> --
> ------------------
> OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
>
> ---
> You received this message because you are subscribed to the Google Groups
> "OPS4J" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ops4j+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master

-- 
-- 
------------------
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
"OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to