Thanks for your replies - very useful to see what other people are doing to
guide our own best practices, obiously trying to find the right pragmatic
balance & ensure we're not over-testing.

Toni - your list of testing levels is helpful. Our pre-OSGi development
only really involved unit testing, system testing & UI testing. We are now
most definitely going to add integration testing to the list, automated
through Pax Exam of course :-) This will be using features for our
integration testing, breaking down features into parts just large enough to
compose the whole application, mixing & matching as needed for different
deployment scenarios. We agree with some of the comments that bundle
testing is a bit of overkill a lot of the time, but it does have it's
place. We are thinking of using this in scenarios where we are producing
bundles that are going to be highly reused across applications.

Andreas - we are using the a version of the Karaf Container on Github prior
to the addition to the Karaf mainline & getting on great with it :-) Really
good to hear it's going to be maintained as part of the Karaf codebase now.

Thanks again,
Jimmi

On 30 January 2012 20:15, Toni Menzel <t...@okidokiteam.com> wrote:

> Thanks for your Feedback, Jimmi! This is highly appreciated ;)
>
> I can only speak for some customers i worked with, actually with OSGi
> based systems its like with building any larger than trivial software
> platform.
> In order to detach from complexity you "zoom" out of the the smaller unit
> (in Java its a single Class) into the next level higher level and do some
> architecture decisions there. Then you again raise the viewport and
> architect from an even higher level.
> Any architectural level deserves to be tested "at that level". In OSGi
> Systems you can think of:
> 1- Unit Testing (Class Level)
> 2- Bundle Testing -> Test Bundle in Isolation. E.g. all other participants
> in the system are mocks. But you are running in an OSGI-like environment
> 3- Integration Testing -> Hook a set of bundles that should work together
> into a runtime (should be a real runtime)
> 4- System Testing -> Depends on deployment scenarios. If you deploy in
> Karaf you want to run really Karaf on machine that is just like the
> production one.
> 5- UI Testing -> At this level nobody cares about the underlying technical
> framework. Use Selenium or whatever fits best.
>
> Pax Exam was built with Cases 2 and 3 in mind but works (since Version 2)
> really good with Case 4 too (read: Karaf Test Container, there is also a
> Glassfish Test Container in the works).
> There is even the possibility to use Pax Exam _AS_ a (production) server.
> In that case the @Configuration-Set just bootstraps your system and leave
> it that way.
>
> Speaking of "bootstrapping more than one test target" Marcel is speaking
> of: well the underlying plumbing layer does not care and already supports
> running against multiple (remote) containers. Its just that the actually
> Test Containers need to be written. I know Harald is working a clean
> ForkedVMContainer as a much more lightweight PaxRunnerContainer
> alternative. That work should contain parts that we will extract (perhaps)
> to finally have the RemoteContainer in place again. - Footnote:
> PaxrunnerContainer is Remote already, its just not explicit.
> Whats not yet in scope is writing cross Test Container Interaction in a
> no-boilerplate-code manner.
>
> Harald & I (at least) have some interesting plans for Exam 3 and beyond
> possibly breaking out of "just" OSGi in that turn.. but thats another story.
> More about that another time. - its what i like to call a "ThinkingBeers"
> topic.
>
> Cheers,
> Toni
>
>
>
> On Mon, Jan 30, 2012 at 1:47 PM, Jimmi Dyson 
> <jimmi.dy...@specsavers.com>wrote:
>
>> Hi there,
>>
>> We're loving PAX Exam here - finding it incredibly useful. :-)
>>
>> This is more of a general question around an integration testing strategy
>> for OSGi. What are people following as best practices? We're thinking of
>> the following steps:
>>
>> 1. Normal unit tests - obviously not in OSGi container
>> 2. Integration test of individual bundle - testing deployment in
>> container through PAX Exam, testing registered services, etc., mocking up
>> any referenced services.
>> 3. Integration test of whole system - testing of bundles working together
>> & with a reasonable environment around it (e.g. database, messaging, etc).
>> Using Karaf features to create the test containers deployed artifacts.
>>
>> All comments would be most appreciated.
>>
>> Thanks,
>> Jimmi
>>
>> ------------------------------
>>
>> NOTICE: This message contains privileged and confidential information
>> intended only for the addressee. If you have received this message in error
>> you must not disseminate, copy or take action on it; please notify
>> specsavers.postmas...@specsavers.com Opinions expressed in this message
>> are those of the sender and do not necessarily represent those of
>> Specsavers. Although this e-mail and any attachments are believed to be
>> virus free, e-mail communications are not 100% secure and Specsavers makes
>> no warranty that this message is secure or virus free. All references to
>> Specsavers means Specsavers Optical Superstores Limited, a company limited
>> by shares and registered in England under number 1721624 of Forum 6,
>> Parkway, Solent Business Park, Whiteley, Fareham, Hampshire, PO15 7PA.
>> Nothing in this transmission shall or shall be deemed to constitute an
>> offer or acceptance of an offer or otherwise have the effect of forming a
>> contract by electronic communication. Your name and address may be stored
>> to facilitate communication.
>> ------------------------------
>> .
>> _______________________________________________
>> general mailing list
>> general@lists.ops4j.org
>> http://lists.ops4j.org/mailman/listinfo/general
>>
>>
>
>
> --
> Toni Menzel Source <http://tonimenzel.com>
>
>
> _______________________________________________
> general mailing list
> general@lists.ops4j.org
> http://lists.ops4j.org/mailman/listinfo/general
>
>

</pre><hr/><p style="margin: 0px; font-family:verdana; 
font-size:xx-small">NOTICE: This message contains privileged and confidential 
information intended only for the addressee. If you have received this message 
in error you must not disseminate, copy or take action on it; please notify 
specsavers.postmas...@specsavers.com Opinions expressed in this message are 
those of the sender and do not necessarily represent those of Specsavers. 
Although this e-mail and any attachments are believed to be virus free, e-mail 
communications are not 100% secure and Specsavers makes no warranty that this 
message is secure or virus free. All references to Specsavers means Specsavers 
Optical Superstores Limited, a company limited by shares and registered in 
England under number 1721624 of Forum 6, Parkway, Solent Business Park, 
Whiteley, Fareham, Hampshire, PO15 7PA.  Nothing in this transmission shall or 
shall be deemed to constitute an offer or acceptance of an offer or otherwise 
have the effect of forming a contract by electronic communication. Your name 
and address may be stored to facilitate communication. 
</p>
<hr/>. 
_______________________________________________
general mailing list
general@lists.ops4j.org
http://lists.ops4j.org/mailman/listinfo/general

Reply via email to