Hi Sameera, This seems to be a very progressive approach. And this will directly resolve the issues we talked about the discussion "C5 - Integration Test" too.
And also, this will illuminate the requirement of providing generic mock bundle for PacExam tests. But we have to pay attention to few details here. 1. Avoid product teams to overuse containers to make it to the integration level. 2. Should provide the functionality to test individual feature with minimum depend on features ( Might need to come up with some mock bundles). I'm +1 for the approach Thank you, Dharshana On Fri, May 13, 2016 at 9:04 AM, Sameera Jayasoma <[email protected]> wrote: > Hi Folks, > > Pax Exam lets you run tests within an OSGi runtime, i.e. all the TestNG > based test code now can run as OSGi bundles. You cannot cover all the > scenario with unit tests. e.g. tests which require an OSGi runtime. > Therefore in-container testing for OSGi plays a crucial role in validating > the Carbon kernel, components and products. Let me show you how. > > *Carbon kernel 5.0* - Carbon kernel contains unit tests and in-container > OSGi tests. We can completely test Carbon kernel using both the mechanisms. > > *Carbon Components* - Since there are no associated products for > individual components, we can use unit tests as well as OSGi tests to > validate our component releases. This would allow us to release components > independents of each other. > > *Carbon based Products* - Product functionality has to be tested with > a comprehensive set of integration tests. But OSGi testing can be used to > test some basic stuff before moving a product build to integration tests. > For example, you can check whether your product starts up without errors or > All the required OSGi services, modules are initialized without issues etc. > > > We are planning to implement a Pax Exam Container for Carbon 5. This would > allow us to start a Carbon kernel or any sort of C5 distribution with any > number of features from a zip file with all the bundles having TestNG based > test code. We can maintain this module withing Carbon for now. Here are > some of the Pax Exam containers maintained by the community. [1] > > We've been using Pax Exam for in-container testing, But in a suboptimal > way. We used their Native container mode where we launch an embedded OSGi > framework using all the Carbon bundles. These Carbon bundles are hard-code > in the test configuration classes. If you are adopting this for your > component, you have put all the Carbon level OSGi bundles as well as all > your component level OSGi bundles. For our experience, this is a major pain > point. Therefore, we planning to rectify these issues by introducing a new > Pax Exam container for Carbon 5. > > Thanks, > Sameera, > > https://ops4j1.jira.com/wiki/display/PAXEXAM4/Test+Containers > > > -- > 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 > > -- 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
