Chapter 10. Testing with Spring DM

 

This chapter covers

  • The concepts of testing, in both standard and OSGi environments
  • When and how to use Spring DM’s OSGi mocks for unit testing
  • When and how to use Spring DM’s support for OSGi integration testing

Testing is one of the most important activities in software development, not only because it ensures better quality in the end product, but also because good testing techniques can make a developer more productive. We introduced Spring DM’s testing support early on in chapter 3 because manually testing the behavior of OSGi components in a target environment can be cumbersome, mainly because of tasks such as provisioning. You discovered then that Spring DM provides support for bootstrapping an embedded OSGi container and running JUnit test classes in it. This early coverage gave you the basics necessary to test your own OSGi bundles, and proved also that OSGi applications aren’t particularly special in this regard: they can also be tested. In this chapter, we’ll cover all the techniques and the tools that you’ll need to test your OSGi components, and hence make your OSGi applications more reliable.

10.1. Testing OSGi components with Spring DM

 

10.2. Strict unit tests for OSGi components

 

10.3. Integration tests for OSGi applications

 
 

10.4. Summary

 
 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest