Re: [pax-exam] How to simulate beforeClass / afterClass hook *outside* of the OSGi container

2017-08-08 Thread Toni Menzel
yes, our ci.ops4j.org deploys successful builds to oss.sonatype.org/content/repositories/ops4j-snapshots automatically. *www.rebaze.de | www.rebaze.com | @rebazeio * On Tue, Aug 8, 2017 at 8:19 PM, 'Christoph

Re: [pax-exam] How to simulate beforeClass / afterClass hook *outside* of the OSGi container

2017-08-08 Thread 'Christoph Läubrich' via OPS4J
Hi Toni, If i see right there is some kind of snapshot repro for OPS4j maybe that would be an Option? I'm not very familar with this I just have seen that when realeasing pax-wicket. If thats not an option we might provide some kind of preview1 ... x Versions? Am 08.08.2017 09:53, schrieb

Re: [pax-exam] How to simulate beforeClass / afterClass hook *outside* of the OSGi container

2017-08-08 Thread Nicolas Brasey
The server mode is not enough for me, as I would like to be able to write tests against the OSGi services directly, I don't want to use the external REST api. Out of curiosity, and not knowing how exactly pax-exam works in details, what is the reason the BeforeClass and AfterClass are not

Re: [pax-exam] How to simulate beforeClass / afterClass hook *outside* of the OSGi container

2017-08-08 Thread Toni Menzel
This is the very simple server mode (i did that back then). If it is enough for you, sure. No big deal. You don't get any lifecycle integration with your test framework and you need to do the configuration for accessing your server yourself (sure, if its only rest, you have all the tools of the

Re: [pax-exam] How to simulate beforeClass / afterClass hook *outside* of the OSGi container

2017-08-08 Thread Toni Menzel
@Nicolas, I think your use case is a prime example out-of-container tests that will become more accessible with Exam 5. (Acceptance Test API). Here's the status: - There is a way to bootstrap a Test Container using the typical Exam Option DSL (done) - There is a very simple Rest Client

Re: [pax-exam] How to simulate beforeClass / afterClass hook *outside* of the OSGi container

2017-08-08 Thread Nicolas Brasey
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

Re: [pax-exam] How to simulate beforeClass / afterClass hook *outside* of the OSGi container

2017-08-08 Thread Toni Menzel
There is already work on this for Pax Exam 5. No worries. *www.rebaze.de | www.rebaze.com | @rebazeio * On Sun, Aug 6, 2017 at 4:19 AM, Niclas Hedhman wrote: > > I thought I should chip in and

Re: [pax-exam] How to simulate beforeClass / afterClass hook *outside* of the OSGi container

2017-08-07 Thread Nicolas Brasey
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

Re: [pax-exam] How to simulate beforeClass / afterClass hook *outside* of the OSGi container

2017-08-05 Thread Niclas Hedhman
I thought I should chip in and point out that Junit 5 ahs received the entire extension mechanism, and both Rules and RunWith constructs are deprecated, and implemented using the new extension system. Perhaps it would make more sense for new functionality in Pax Exam to look forward to JUnit 5.

Re: [pax-exam] How to simulate beforeClass / afterClass hook *outside* of the OSGi container

2017-08-05 Thread 'Christoph Läubrich' via OPS4J
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

Re: [pax-exam] How to simulate beforeClass / afterClass hook *outside* of the OSGi container

2017-08-04 Thread Nicolas Brasey
On Fri, Aug 4, 2017 at 3:39 PM, Toni Menzel wrote: > So, about the imports: yes, well there used to be an option to let you > mark all generated imports to be optional for the probe. Have to look at > this. > > Ok I will look into this option, thanks for the tips. >

Re: [pax-exam] How to simulate beforeClass / afterClass hook *outside* of the OSGi container

2017-08-04 Thread Toni Menzel
So, about the imports: yes, well there used to be an option to let you mark all generated imports to be optional for the probe. Have to look at this. About the Acceptance Driver: yes it will work with any Pax Exam Test Container. Stay tuned. About the pre/post hooks: can you try implementing a

Re: [pax-exam] How to simulate beforeClass / afterClass hook *outside* of the OSGi container

2017-08-04 Thread Nicolas Brasey
Hi Tony, Thanks a lot for your answer. I think what you are working on is absolutely great, and I think it would also perfectly fit for our needs. Starting the OSGi container from a junit rule makes the tests cleaner. I guess this would also work with Karaf, right ? But, just for the curiosity,

Re: [pax-exam] How to simulate beforeClass / afterClass hook *outside* of the OSGi container

2017-08-04 Thread Toni Menzel
Hey Nicolas, I think you are looking at something like the (new) acceptance test api that runs from outside of osgi: https://github.com/ops4j/org.ops4j.pax.exam2/blob/master/drivers/pax-exam-acceptance/src/test/java/org/ops4j/pax/exam/acceptance/AcceptanceTestApiTest.java This is currently in