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
_______________________________________________ Architecture mailing list [email protected] https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
