Testing OSGi applications is a little different from other platforms. This talk aims to get people started with testing on OSGi and provide an overview of the options as well as practical examples.
Unit testing
Testing starts at the unit test level. Every project should have a good coverage by really fast tests (<10s for all tests). The talk will show practical cases of unit testing declarative services based code and how to shield your business code from OSGi API. We will also look into some typical pitfalls.
Integration testing
There is a variety of integration testing frameworks for OSGi. We will look into some of the frameworks (pax-exam, karaf testcontainer, bnd tests) and give advice which to choose in your environment and which best practices to follow. One hidden gem is how to debug OSGi tests without remote debugging and without a manual build.
System testing
As last part the talk shows how to package your OSGi application in docker and do a system test on docker level with the help of the testcontainers framework.