On Tue, Nov 17, 2009 at 8:57 PM, Bertrand Delacretaz
<[email protected]> wrote:
> On Tue, Nov 17, 2009 at 8:31 PM, Carsten Ziegeler <[email protected]> 
> wrote:
>> Alexander Klimetschek wrote:
>>>> I would say go with simple unit tests where you can work with mock
>>>> objects. If you need a full blown resource resolver, just use pax exam,
>>>> fire up an osgi framework and start the jcr bundle. It's really easy to
>>>> do this.
>>>
>>> How fast is it? Can you provide an example?
>> It's not fast, but it's fast enough for a unit test.
>> Apache Felix junit4osgi is an alternative that we could use as well,
>> it's a little bit faster.
>> I don't have an example :) I tried to write some tests some weeks ago
>> and got there very quickly. I think Felix is using this for testing
>> config admin and scr....
>
> The jcrinstall osgi controller tests use pax exam, see
> http://svn.apache.org/repos/asf/sling/trunk/installer/osgi/it
>
> Currently pax exam starts the framework for each test, for isolation.
> That can be a bit slow, but it's not too bad as it's easy to select
> single tests for execution when needed.

Don't underestimate that, the felix trunk now takes ages to build if
you forget to disable tests. It sure would be nice if pax exam would
be able to test inside the same vm and run more then one testclass in
the same felix instance :-(

regards,

Karl

> The Maven CLI plugin [1] also
> helps run single tests much faster.
>
> -Bertrand
>
> [1] 
> http://grep.codeconsult.ch/2009/05/05/faster-testing-with-the-maven-cli-plugin/
>



-- 
Karl Pauls
[email protected]

Reply via email to