Hi all,

I'm trying to implement the pax exam container for C5. I'm going to
implement the container like the existing Karaf container in pax exam[1].
So initially there has to be two implementations of "TestContainer" and
"TestContainerFactory" interfaces in pax exam. Currently I'm working on
those. But this is still a POC level implementation.

[1]. https://ops4j1.jira.com/wiki/display/PAXEXAM4/Karaf+Container

Thanks,
Chanaka.

On Sat, May 14, 2016 at 6:20 AM, Dharshana Warusavitharana <
[email protected]> wrote:

> Hi, Manu/Sameera.
>
> In any case, OSGI Container based tests won't be unit tests. And if any
> test integrates more than one unit it would be an integration test in
> theory.  But we cannot stick to hard and fast rules. Yes, I'm also against
> to the point calling PaxExan test are unit tests. But we have to use them
> to test our containerized platform. So we have to give guys the option to
> write a PaxExan test only and only if it could not be covered by a java
> level unit test. But at some point mocking becomes really expensive we have
> to use alternative paths , sometimes violating some basics.
>
> At the moment MB team is doing a great job maintaining good discipline in
> adding tests.  Other teams must come to that level and be active and
> discuss before adding PaxEam tests.
>
> But what Sameera initiates here is different from both existing unit test
> and PaxExam tests. It should come under the feature level, not component
> level. So that we can test each feature basic functionalities like whether
> feature starts correctly with the base carbon features. Whether all ports
> are exposed as expected so on.
>
> My point here is we need some mechanism to say this bundle is working and
> activated correctly before it gets deployed in final product pack. So as my
> understanding this is not a unit test. But this will cover the feature
> level before we build up the final pack and test whole scenario in
>  production like platform.
>
> Thank you,
> Dharshana.
>
> On Sat, May 14, 2016 at 12:15 AM, Manuranga Perera <[email protected]> wrote:
>
>> In my view,
>>
>> A test is not a unit test if:
>>>
>>>    - It talks to the database
>>>    - It communicates across the network
>>>    - It touches the file system
>>>    - It can't run at the same time as any of your other unit tests
>>>    - You have to do special things to your environment (such as editing
>>>    config files) to run it. [1]
>>>
>>> But I am not saying integration tests are bad or anything. We need
>> integration tests, and PAX is a good way to do that. But those are
>> integration tests.
>>
>>
>> [1] http://www.artima.com/weblogs/viewpost.jsp?thread=126923
>>
>> On Fri, May 13, 2016 at 2:11 PM, Sameera Jayasoma <[email protected]>
>> wrote:
>>
>>> Manu,
>>>
>>> You are missing the whole point here. Just because we copy a file in our
>>> tests, they don't become integration tests. Can you tell me what an
>>> integration test from your understanding?
>>>
>>> We do not need to copy files and hard-code OSGi bundles once this Pax
>>> Exam container for Carbon 5 is available.
>>>
>>> On Fri, May 13, 2016 at 10:48 PM, Manuranga Perera <[email protected]>
>>> wrote:
>>>
>>>> Hi Dharshana,
>>>>
>>>>> Avoid product teams to overuse containers to make it to the
>>>>> integration level.
>>>>
>>>> PAX is already at integration level. You can see the kernel team is
>>>> coping yaml files in PAX tests. This means they not unit tests.
>>>>
>>>> [1]
>>>> https://github.com/wso2/carbon-kernel/blob/master/tests/osgi-tests/src/test/java/org/wso2/carbon/osgi/runtime/CarbonRuntimeOSGiTest.java#L120
>>>> --
>>>> With regards,
>>>> *Manu*ranga Perera.
>>>>
>>>> phone : 071 7 70 20 50
>>>> mail : [email protected]
>>>>
>>>> _______________________________________________
>>>> Architecture mailing list
>>>> [email protected]
>>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>>>
>>>>
>>>
>>>
>>> --
>>> Sameera Jayasoma,
>>> Software Architect,
>>>
>>> WSO2, Inc. (http://wso2.com)
>>> email: [email protected]
>>> blog: http://blog.sameera.org
>>> twitter: https://twitter.com/sameerajayasoma
>>> flickr: http://www.flickr.com/photos/sameera-jayasoma/collections
>>> Mobile: 0094776364456
>>>
>>> Lean . Enterprise . Middleware
>>>
>>>
>>> _______________________________________________
>>> Architecture mailing list
>>> [email protected]
>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>>
>>>
>>
>>
>> --
>> With regards,
>> *Manu*ranga Perera.
>>
>> phone : 071 7 70 20 50
>> mail : [email protected]
>>
>> _______________________________________________
>> Architecture mailing list
>> [email protected]
>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>
>>
>
>
> --
>
> Dharshana Warusavitharana
> Senior Software Engineer , Test Automation
> WSO2 Inc. http://wso2.com
> email : [email protected] <[email protected]>
> Tel  : +94 11 214 5345
> Fax :+94 11 2145300
> cell : +94770342233
> blog : http://dharshanaw.blogspot.com
>
> lean . enterprise . middleware
>
> _______________________________________________
> Architecture mailing list
> [email protected]
> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>
>


-- 
Chanaka Cooray
Software Engineer, WSO2 Inc. http://wso2.com
Email: [email protected]
Mobile: +94713149860
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to